Date: Mon, 10 Aug 2015 20:54:52 +0200 From: Alex de Kruijff <akruijff@dds.nl> To: tzezula@netbeans.org, Alfatrion@netbeans.org Cc: freebsd-java@freebsd.org Subject: Re: [Bug 254210] Running application build for Java8 fails because it looks for Java7 Message-ID: <55C8F37C.6020904@dds.nl> In-Reply-To: <bug-254210-97783-fXQlQbccEn@https.netbeans.org/bugzilla/> References: <bug-254210-97783@https.netbeans.org/bugzilla/> <bug-254210-97783-fXQlQbccEn@https.netbeans.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
I've included the java list from FreeBSD. On 10-08-2015 15:42, tzezula@netbeans.org wrote: > https://netbeans.org/bugzilla/show_bug.cgi?id=254210 > > Tomas Zezula <tzezula@netbeans.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |RESOLVED > Resolution|--- |INCOMPLETE > Target Milestone|TBD |8.1 > > --- Comment #2 from Tomas Zezula <tzezula@netbeans.org> --- > Seems as a problem of the JDK 1.7.0_80 on BSD. > The IDE does not set java.library.path unless the user does it in the project > properties. The default value of the java.library.path should be taken from the > ${DYLD_LIBRARY_PATH} and extended by the VM. It seems that for some reason the > DYLD_LIBRARY_PATH contains the /usr/local/openjdk7/jre/lib/amd64. > > Unfortunately I cannot verify as I don't have FreeBSD, can you execute the > following Java code both in NetBeans and command line using JDK 7 and attach > the output: > > public static void main(String[] args) { > System.out.printf("java.version = %s%n", System.getProperty("java.version")); > System.out.printf("java.library.path = %s%n", > System.getProperty("java.library.path")); > System.out.printf("DYLD_LIBRARY_PATH = %s%n", > System.getenv("DYLD_LIBRARY_PATH")); > } > > Also the shell echo ${DYLD_LIBRARY_PATH} is needed. > Thanks > > > You can resolve the problem by adding the following VM Option into > Project/Properties/Run: > > -Djava.library.path=/usr/local/lib *My original code works if I do this**:* --------------------------------------------------- cd /usr/local/openjdk7/jre/lib/amd64; mv libnet.so libnet.so.bak; ln -sv /usr/local/openjdk8/jre/lib/amd64/libnet.so Then it works. Of course now thereis a problem with JDK7 projects. *The output you requested:* --------------------------------------------------- java.version = 1.8.0_51 java.library.path = /usr/local/openjdk7/jre/lib/amd64:/usr/local/openjdk7/jre/lib/i386::/usr/local/lib DYLD_LIBRARY_PATH = null *And the result of -Djava.library.path=/usr/local/lib* --------------------------------------------------- No. I've tried al kinds of stuff with this option. I get the same exception again: Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/openjdk8/jre/lib/amd64/libnio.so: /usr/local/openjdk7/jre/lib/amd64/libnet.so: version SUNWprivate_1.1 required by /usr/local/openjdk8/jre/lib/amd64/libnio.so not defined I've also tried: -Djava.library.path=/usr/local/openjdk8/jre/lib/amd64:/usr/local/openjdk8/jre/lib/i386::/usr/local/lib And: -Djava.library.path=/usr/local/openjdk8/jre/lib/amd64 But that also doesn't work. Same exception. P.S. Using the VM option is hard for Maven projects Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55C8F37C.6020904>