# Native vs Linux JDK



## ikbendeman (Feb 23, 2010)

I seem to have some crashes with the native jdk16. Does anybody here use the linuxjdk? Or earlier versions of jdk? Sorry for being kind of ignorant on the subject but are there advantages to using one over the other? And which do you guys use? I'm running FreeBSD 8.0-STABLE so it seems to me that maybe the linux ABI support would work well enough that running linux jdk would be a better option? Thanks in advance.


----------



## lme@ (Feb 23, 2010)

Which JDK do you use? jdk16, diablo-jdk16 or openjdk16? Normally there's no need to use the linux-jdk16.


----------



## achix (Feb 23, 2010)

Just go with openjdk* where all future development will take place. Beware though that javavmwrapper no longer respects /usr/local/etc/javavms but relies on /usr/ports/Mk/bsd.java.mk which for some reason (which is beyond me) always favors Diablo. Hacking /usr/ports/Mk/bsd.java.mk will help until the next `# portsnap fetch` so your best option is to make use of the JAVA_HOME env variable.
`# setenv JAVA_HOME /usr/local/openjdk6` will do the trick. Also i have the slight impression that jboss starts a little more faster in my 8.0-RELEASE-p2 amd64 with OpenJDK than Diablo.
Another note, be aware that Diablo is compiled for FreeBSD-7.* hence it needs the COMPAT_FREEBSD7 kernel option.
Anyway, the recommended port is Openjdk, followed by native jdk, followed by Diablo. I have never run the linux-sun-jdk16 port, and i doubt people have been relying on a linux jdk for quite some years now.


----------



## ikbendeman (Feb 24, 2010)

thank you! duh.. I was using 
	
	



```
set JAVA_HOME=/usr/local/openjdk6
```
 rather than 
	
	



```
setenv
```
... Now I can experiment properly...  Thanks.



			
				achix said:
			
		

> Just go with openjdk* where all future development will take place. Beware though that javavmwrapper no longer respects /usr/local/etc/javavms but relies on /usr/ports/Mk/bsd.java.mk which for some reason (which is beyond me) always favors Diablo. Hacking /usr/ports/Mk/bsd.java.mk will help until the next `# portsnap fetch` so your best option is to make use of the JAVA_HOME env variable.
> `# setenv JAVA_HOME /usr/local/openjdk6` will do the trick. Also i have the slight impression that jboss starts a little more faster in my 8.0-RELEASE-p2 amd64 with OpenJDK than Diablo.
> Another note, be aware that Diablo is compiled for FreeBSD-7.* hence it needs the COMPAT_FREEBSD7 kernel option.
> Anyway, the recommended port is Openjdk, followed by native jdk, followed by Diablo. I have never run the linux-sun-jdk16 port, and i doubt people have been relying on a linux jdk for quite some years now.


----------

