From owner-freebsd-java@freebsd.org Mon Apr 4 12:03:11 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09DC9B01903 for ; Mon, 4 Apr 2016 12:03:11 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smadev.internal.net", Issuer "smadev.internal.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8395B18C8 for ; Mon, 4 Apr 2016 12:03:09 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id u34Bsgul026139 for ; Mon, 4 Apr 2016 14:54:42 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: when do I need to set JAVA_HOME? To: freebsd-java@freebsd.org References: <201604041104.u34B49Tw051741@mech-as222.men.bris.ac.uk> From: Achilleas Mantzios Message-ID: <57025602.7060008@matrix.gatewaynet.com> Date: Mon, 4 Apr 2016 14:54:42 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201604041104.u34B49Tw051741@mech-as222.men.bris.ac.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2016 12:03:11 -0000 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