octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java compilation warnings


From: Richard
Subject: Re: Java compilation warnings
Date: Fri, 07 Dec 2012 16:31:55 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

On 07/12/2012 16:20, Philip Nienhuis wrote:
Richard Crozier-3 wrote
On 06/12/2012 19:20, Rik wrote:
a directly I'm not sure what exactly is required.
You probably mean jni.h


yup!

I saw quite a few posts about this related to MacOS a while back, was
there a solution to this that will also work for Linux?
On Linux, you need a Java JDK and a proper JAVA_HOME setting.
The Java executables javac (Java compiler) and jar (Java archiver) are
probably symlinked in /usr/bin/
On MinGW this isn't the case so the subdir containing jar.exe and javac.exe
needs to be in the PATH. If 'javac --version' doesn't work for you you'd
rather follow MinGW, or create the symlinks yourself.

When Java was still an octave-forge package, a proper JAVA_HOME setting was
simply essential.
Perhaps the logic in this former java-package preinstall.m may enlighten
you:
http://sourceforge.net/p/octave/code/11449/tree/trunk/octave-forge/extra/java/pre_install.m

According to an old post by Michael Goffioul in the OctDev ML, JAVA_HOME
should be set such that (in the end, after following all symlinks):
   <JAVA_HOME>/jre/lib/<arch>/client/
contains the JVM (libjvm.so).
In the meantime on 64bit systems the JVM is often found in
   <JAVA_HOME>/jre/lib/<arch>/server/

The attempts in the autotools to discover JAVA_HOME just don't work that
well at the moment.
Perhaps following the symlinks starting from /usr/bin/javac might help on
Linux (if javac is symlinked to from /usr/bin, that is).
On MinGW I'm afraid setting JAVA_HOME by hand will be unavoidable, as the
JDK can only be found by quite involved trial and error (and some luck).
I got reports from a Fink developer telling me that on Mac OSX the JDK
location might change with every new OSX version and the JDK is no more
comprehensive but scattered all over the place. The Apple tool 'javaconfig'
is needed to find out what parts are where.

Philip


Thanks, I will try these suggestions and see how it goes.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]