octave-maintainers
[Top][All Lists]
Advanced

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

Re: Java compilation warnings


From: Philip Nienhuis
Subject: Re: Java compilation warnings
Date: Fri, 7 Dec 2012 08:20:44 -0800 (PST)

Richard Crozier-3 wrote
> On 06/12/2012 19:20, Rik wrote:
>> 12/6/12
>>
>> All,
>>
>> There is still quite a bit of work to do in importing the Java package
>> into
>> core and bringing it up to core standards.
>>
>> --Rik
>>
> 
> In a related matter, I have been getting an error about not being able 
> to find jini.h (I think) when trying to build the dev sources on Mint 
> Linux 14 (basically Ubuntu). I have openjdk installed but as I don't use 
> java directly I'm not sure what exactly is required.

You probably mean jni.h


> 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




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Java-compilation-warnings-tp4647602p4647621.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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