when do I need to set JAVA_HOME?
Achilleas Mantzios
achill at matrix.gatewaynet.com
Mon Apr 4 12:03:11 UTC 2016
On 04/04/2016 14:04, Anton Shterenlikht wrote:
> I'm having troubles running an openGL
> 3D visualisation over ssh -Y:
>
> javax.media.opengl.GLException: Error making context current
> at com.sun.opengl.impl.x11.X11GLContext.makeCurrentImpl(X11GLContext.java:141)
> at com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl(X11OnscreenGLContext.java:69)
> at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:127)
>
> The X server is on FreeBSD 11-current.
>
> It was suggested to me
> to double check Java setup.
>
> I have installed
>
> $ pkg info -xo jdk
> linux-oracle-jdk18-8.77 java/linux-oracle-jdk18
> openjdk8-8.77.3 java/openjdk8
>
> Both ports rely on java/javavmwrapper, which installs
> symlinks under /usr/local/bin, all pointing to
> /usr/local/bin/javavm.
>
> So is it not recommended to invoke binaries from either
> of the above ports directly?
> Will these be invoked
> somehow via /usr/local/bin/javavm?
>
> The javavm(1) man page lists multiple env var, e.g.
> JAVA_HOME, JAVA_OS, none of which I have set.
>
> So I'm unsure:
>
> 1. If I have only a single JDK port installed,
> do I need to set any env vars or anything else up
> to be able to use Java?
>
> 2. If I have multiple JDK installed, as above,
> how do I choose which one is used?
The wrapper implements some kind of preferences criteria, and then by default calls the supposed preferred version for this OS. Setting JAVA_HOME definitely has an impact.
BTW, bypassing the wrapper and calling java directly is fine.
>
> Thanks
>
> Anton
> _______________________________________________
> freebsd-java at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe at freebsd.org"
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
More information about the freebsd-java
mailing list