octave-maintainers
[Top][All Lists]
Advanced

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

Re: java package - Mac Os X


From: PhilipNienhuis
Subject: Re: java package - Mac Os X
Date: Tue, 16 Jul 2013 11:53:49 -0700 (PDT)

bpabbott wrote
> On Jul 16, 2013, at 12:36 PM, CdeMills wrote:
> 
>> Hello,
>> 
>> I have some very obfuscated Excell file I would like to open with the io
>> and
>> java packages. Installation of the java package fails:
>> 
>> - context: Mac Os X Mountain Lion
>> - octave-devel and poi (Apache POI) installed through macport
>> - JAVA_HOME set from `/usr/libexec/javahome`:
>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>> - java -version:
>> java version "1.6.0_51"
>> Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
>> Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
>> - javac  -version
>> javac 1.6.0_51
>> 
>> Under octave:
>> pkg  install -verbose -forge java
>> mkdir (/var/tmp/oct-IIMkG0)
>> untar (/Users/pasdupuis/java-1.2.9.tar.gz, /var/tmp/oct-IIMkG0)
>> ./configure: line 3257: test: too many arguments
>> configure: WARNING: this package requires at least Java-1.5
>> checking for gcc... /opt/local/bin/gcc-mp-4.7
>> 
>> octave commands will install into the following directories:
>>   m-files:   /opt/local/share/octave/3.6.4/site/m/octave-forge
>>   oct-files:
>> /opt/local/lib/octave/3.6.4/site/oct/x86_64-apple-darwin12.3.0/octave-forge
>>   binaries: 
>> /opt/local/libexec/octave/3.6.4/site/exec/x86_64-apple-darwin12.3.0
>> 
>> First thing: those path didn't exist; I had to create the last two
>> components for each path.
>> 
>> Then installation finishes with a simple "Java support not compiled", and
>> the file __java__.oct is not created. Just in case I restarted the
>> installation as admin user, same result.
>> 
>> Any idea of what's going wrong ?  How can I provide more usefull debug
>> info
>> ?
>> 
>> Regards
>> 
>> Pascal
> 
> 
> I noticed that macports has a java package available, and you're running
> Octave-3.6.4 installed via macports.  Any reason you don't want to install
> the java package from macports?
> 
>       sudo port install octave-java
> 
> There is an open bug report that doesn't bode well for you goal.
> 
>       http://trac.macports.org/ticket/30866
> 
> I tried installing java package via macports, but java_invoke.m is not
> present ... is it supposed to be?
> 
> Regarding building the java package yourself, have you tried the "-local"
> flag?
> 
> Regarding the version of java, I have 1.6 installed.
> 
>       $ java -version
>       java version "1.6.0_51"
>       Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
>       Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

The sneaky thing is that the java package often *appears* to build & install
fine, but is actually only half-compiled. Only when using the pkg -verbose
flag
"pkg install -verbose <other_options> java-1.2.9.tar.gz" 
one could spot the little message like 
"java --- no" 
somewhere.
Maybe it is of little comfort, but the same often happened on Windows and
Linux.

>From recent experience with cross-compiling Java support in MXE, it turns
out that only the following two things are needed for Java support in core
Octave for MinGW builds. It is likely that similar requirements apply to the
Java package in any other platform:
- Octave (or the java package configure) must be able to find jni.h in some
JDK <include> directory and jni-md.h in a subdir thereof
- The executables javac (Java compiler) and jar (Java archiver) must be in
the PATH, to build octave.jar
On other platforms than OSX:
- The path to the JVM (libjvm.so or ...dylib or whatever) must be supplied
somehow.

Using this info, maybe the java package build flags can be amended so that
it also builds on OSX.
But on OSX there may be additional issues.

IIRC Alexander Hansen had more to say (the thread I mentioned in my other
post).

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/java-package-Mac-Os-X-tp4655701p4655718.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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