# Java won't run



## Stringer (Jul 21, 2011)

Greetings!

I've had this problem for sometime, when I try to run java, javavm. It won't do it on some users I got then it will show:

```
java: error: no suitable JavaVMs found
```

While if I do it from either root or wheel users it works just fine.

And I have set the permission to +rx on java for "Others".


----------



## SirDice (Jul 21, 2011)

What are the permissions on /etc/make.conf?


----------



## Stringer (Jul 21, 2011)

```
-rw-r--r--  make.conf
```


----------



## SirDice (Jul 21, 2011)

Do you actually hava a JVM installed? It looks like you only have java/javavmwrapper installed.


----------



## Stringer (Jul 21, 2011)

```
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
```
Comes up when I do [CMD=""]java -version[/CMD] (with root).


----------



## SirDice (Jul 21, 2011)

What are the permissions on /usr/local/diablo? Or at least I think that was the directory, I don't have diablo.


```
root@molly:/usr/ports#ls -al /usr/local/linux-sun-jdk1.6.0/
total 18774
drwxr-xr-x  10 root  wheel       512 Jun 20 22:15 .
drwxr-xr-x  15 root  wheel       512 Jun 20 22:14 ..
-r--r--r--   1 root  wheel      3339 Feb  3 02:30 COPYRIGHT
-r--r--r--   1 root  wheel     28230 Feb  3 02:30 README.html
-r--r--r--   1 root  wheel     25317 Feb  3 02:30 README_ja.html
-r--r--r--   1 root  wheel     20663 Feb  3 02:30 README_zh_CN.html
-r--r--r--   1 root  wheel        76 Feb  3 02:30 THIRDPARTYLICENSEREADME.txt
drwxr-xr-x   2 root  wheel      1024 Jun 20 22:14 bin
drwxr-xr-x   7 root  wheel       512 Jun 20 22:14 db
drwxr-xr-x  10 root  wheel       512 Jun 20 22:15 demo
drwxr-xr-x   3 root  wheel       512 Jun 20 22:15 include
drwxr-xr-x   7 root  wheel       512 Jun 20 22:15 jre
drwxr-xr-x   3 root  wheel       512 Jun 20 22:15 lib
drwxr-xr-x   4 root  wheel       512 Jun 20 22:15 man
drwxr-xr-x   9 root  wheel       512 Jun 20 22:15 sample
-rw-r--r--   1 root  wheel  19103072 Feb  3 02:30 src.zip
```
Permissions should be similar though.


----------



## Stringer (Jul 21, 2011)

Oddly it doesn't:

```
drwx------   9 root  wheel       512 Jul 21 21:44 .
drwxr-xr-x  20 root  wheel       512 Jul 21 21:44 ..
-r--------   1 root  wheel      4137 May 13  2008 COPYRIGHT
-r--------   1 root  wheel     11450 May 13  2008 LICENSE
-r--------   1 root  wheel     28599 May 13  2008 README.html
-r--------   1 root  wheel     24132 May 13  2008 README_ja.html
-r--------   1 root  wheel     18329 May 13  2008 README_zh_CN.html
-r--------   1 root  wheel    190102 May 13  2008 THIRDPARTYLICENSEREADME.txt
drwx------   2 root  wheel      1024 May 13  2008 bin
drwx------  10 root  wheel       512 May 13  2008 demo
drwx------   3 root  wheel       512 May 13  2008 include
drwx------   6 root  wheel       512 May 13  2008 jre
drwx------   2 root  wheel       512 May 13  2008 lib
drwx------   4 root  wheel       512 May 13  2008 man
drwx------   9 root  wheel       512 May 13  2008 sample
-rw-------   1 root  wheel  18719680 May 13  2008 src.zip
```


----------



## SirDice (Jul 22, 2011)

Now there's your problem :e

What's root's umask?


----------



## Stringer (Jul 22, 2011)

077
I think it is..


----------



## SirDice (Jul 22, 2011)

Ah. That's the problem. Set it to 022 and reinstall the port. I'm sure that will take care of the permissions.

I do think this is a bug with the port though. It should install with the proper permissions regardless of the umask.


----------

