# netbeans java --jdkhome switch



## pnguine (Apr 4, 2010)

Hi All

I think I have installed netbeans 6.7 OK from ports (couldn't find 6.8) but now I can't start it. 
	
	



```
netbeans --help
```
gives
	
	



```
Usage: /usr/local/netbeans67/bin/../platform10/lib/nbexec {options} arguments
```
and
	
	



```
Cannot find java. Please use the --jdkhome switch.
```
so I tried
	
	



```
<path_to>/netbeans --jdkhome /usr/local/bin/java
```
but that just returned the same thing.

Anyone know what I need to do to get netbeans running?

TIA


----------



## sixtydoses (Apr 4, 2010)

Current version of netbeans in ports tree is 6.8.


```
[od@meh /usr/ports/java/netbeans]$ more Makefile | grep -i version
PORTVERSION=	6.8
DISTNAME=	netbeans-${PORTVERSION}-200912041610-ml
JAVA_VERSION=	1.5+
DATADIR=	${PREFIX}/${PORTNAME}${PORTVERSION:S/.//}
	@${LN} -sf ${DATADIR}/bin/netbeans ${PREFIX}/bin/${PORTNAME}${PORTVERSION:S/.//}
```


What version of java you have there?


----------



## pnguine (Apr 4, 2010)

from java -version
	
	



```
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
```
when I do
	
	



```
cd /usr/ports/java/netbeans
make install clean
```
it says
	
	



```
extracting for netbeans-6.7
```


----------



## gilinko (Apr 4, 2010)

If you don't have netbeans 6.8 then your ports tree is seriously out of date. The update to 6.8 was added in mid December last year. Update your ports tree and reinstall netbeans, including all other software that has been updated since then.


----------



## pnguine (Apr 4, 2010)

Thanks, yes I realized that last night. The ports tree was the one installed off the DVD that I downloaded last week so I updated it with portsnap and then installed 6.8 and now it works. Cool.


----------

