Date: Mon, 4 Apr 2016 14:54:42 +0300 From: Achilleas Mantzios <achill@matrix.gatewaynet.com> To: freebsd-java@freebsd.org Subject: Re: when do I need to set JAVA_HOME? Message-ID: <57025602.7060008@matrix.gatewaynet.com> In-Reply-To: <201604041104.u34B49Tw051741@mech-as222.men.bris.ac.uk> References: <201604041104.u34B49Tw051741@mech-as222.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57025602.7060008>