octave-maintainers
[Top][All Lists]
Advanced

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

Re: Java on MinGW


From: Philip Nienhuis
Subject: Re: Java on MinGW
Date: Wed, 12 Dec 2012 13:37:45 -0800 (PST)

Rik-4 wrote
> On 12/12/2012 02:39 AM, 

> octave-maintainers-request@

>  wrote:
>> On MinGW (gcc 3.5.2):
>>
>> ## W/o JAVA_HOME:
>> :
>> configure: WARNING: JAVA_HOME environment variable not initialized.
>> configure: WARNING: Auto-detection will proceed but is unreliable.
>> checking for java... /c/WINDOWS/system32/java
>> checking for javac... no
>> checking for jar... no
>> configure: WARNING: No javac compiler or jar executable found. Octave
>> will
>> not be able to call Java methods.
>> configure: creating ./config.status
>> :
>> Java home: C:\Programs\Java\jre6
>> Java JVM path:
>> Java CPPFLAGS:
>> Java libraries:
>> :
>>
>> ## W. JAVA_HOME /c/Programs/Java/jdk1.6.0_33
>> :
>> checking for java... /c/Programs/Java/jdk1.6.0_33/jre/bin/java
>> checking for javac... /c/Programs/Java/jdk1.6.0_33/bin/javac
>> checking for jar... /c/Programs/Java/jdk1.6.0_33/bin/jar
>> checking for Java version... 1.6.0_33
>> configure: WARNING: Library libjvm not found. Octave will not be able to
>> call Java methods.
>> :
>> Java home: /c/Programs/Java/jdk1.6.0_33
>> Java JVM path:
>> Java CPPFLAGS:
>> Java libraries:
>> :
>>
>> Looks similar to what happens on my Linux-Mageia 2 box; it finds the
>> executables OK but not the jvm.
> 12/12/12
> 
> Philip,
> 
> I'm not too surprised.  I have a FIXME note about uncertainties I had
> about
> MinGW and Cygwin platforms.
> 
> I can accommodate, but can you tell me what the name of the library to
> look
> for is?  On Unix systems it is libjvm.so.  On Cygwin or MinGW a little
> Google searching seems to show that it might be "jvm.dll", "jvm.dll.a",
> "libjvm.dll", "libjvm.dll.a".  I don't use either platform and have no
> idea.
> 
> Secondly, can you open a shell and go to the top-level Octave source
> directory.  From there, run the following and report what it says.
> 
> cd build-aux
> java OctJavaQry JAVA_HOME
> java OctJavaQry JAVA_LDPATH
> java OctJavaQry JAVA_BOOTPATH
>  
> Finally, where is the jni.h include file?  Is it at $JAVA_HOME/include as
> it is for Linux platforms?  Is there a $JAVA_HOME/include/win32 directory
> that has jni_md.h?
> 
> --Rik
> 
> p.s. I checked in more changes today
> (http://hg.savannah.gnu.org/hgweb/octave/rev/eade542fedaa).  Please do 'hg
> pull; hg update; bootstrap' to generate the new configure

OK I checked on my 64b Win7 box at work:
It's the same layout as on my home 32b box (XP) (see my other post)
The jvm.cfg file is in <JAVA_HOME>/jre/lib/amd64/ but that seems to be OK
for x86_64 (or maybe it *is* an AMD at work, I must be a bit oblivious there
- the IT guys made it Just Work so I don't bother).


The build-aux stuff in MinGW:

address@hidden ~/octdev/octave/build-aux
$ java OctJavaQry JAVA_HOME
C:\Programs\Java\jre6

address@hidden ~/octdev/octave/build-aux
$ java OctJavaQry JAVA_LDPATH
c:\WINDOWS\system32;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;x:\Programs\gpl
ibs\bin;x:\Programs\OctaveLibs\bin;.;X:\programs\msys\local\bin;X:\Programs\mingw\bin;X:\p
rograms\msys\bin;X:\programs\msys\bin;X:\Programs\mingw\bin;x:\programs\gplibs\bin;X:\Prog
rams\GnuWin32\bin;x:\programs\OctaveLibs\bin;c:\Programs\gs\gs9.02\bin;c:\WINDOWS\system32
;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Programs\TortoiseSVN\bin;c:\Programs\gs\gs9.02\bin
;c:\Programs\QuickTime\QTSystem\;c:\Programs\Mercurial;X:\programs\msys\home\Philip\qt4\qt
-everywhere-opensource-src-4.7.4\bin;x:\Programs\GnuWin32\bin;.

address@hidden ~/octdev/octave/build-aux
$ java OctJavaQry JAVA_BOOTPATH
C:\Programs\Java\jre6\bin

...so you see it picks up the JRE, not the JDK (they are installed
alongside).
I'm more or less convinced that on MinGW a manual JAVA_HOME environment
setting is unavoidable.


BTW with your latest patch the JVM is still not found. Based on the output I
suspect the configure script looks in <JAVA_HOME>/jre/lib/*/client but on
Windows systems there's no jvm there. 
For MinGW better look for <JAVA_HOME>/jre/lib/<arch>/jvm.cfg
(or for jvm.dll in the <JAVA_HOME>/bin/client/ or <JAVA_HOME>/bin/server/
subdirs, depending on 32 or 64 bit architecture).

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Re-Java-on-MinGW-tp4647811p4647821.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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