Trying to install the java package.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to install the java package.

Geoffry Roberts
All,

What can I do?

I have just installed the binary version of Octave on my OSX machine. Following the instructions, I checked for the java package

>> pkg list

showed java 1.2.9 was installed

I tried

>> s = javaObject ("java.lang.String", "Hello OctaveString")

error: javaObject: Octave was not compiled with Java interface


I did 

>> pkg uninstall java

>> setenv ("JAVA_HOME", "/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home")

>> pkg install -forge java

Error while trying to install Java package:

JAVA_HOME environment variable does not properly point to a JDK

  Hint:

  JAVA_HOME should usually be set such that either:

  (on *nix:)

    <JAVA_HOME>/jre/lib/<arch>/client/ contains libjvm.so (file or symlink)

  (on OSX:)

    <JAVA_HOME>/../Libraries/ contains a file libclient.dylib


I did the following because it is the only jdk I have installed that has libclient.dylib in it:

 

>> setenv ("JAVA_HOME", "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries")


Then I did:

>> pkg install -forge java

./configure: line 3257: test: -n: integer expression expected

configure: WARNING: this package requires at least Java-1.5

warning: function /Users/gcr/octave/java-1.2.9/errordlg.m shadows a core library function


But when I try:


>> s = javaObject ("java.lang.String", "Hello OctaveString")

error: javaObject: Octave was not compiled with Java interface


I'm back to where I started from.


What can I do?  Is there a manual install I can do?


I have:

OSX 10.9.2
java 1.7.0_55
octave 3.8.0

Thanks is advance

--
My software always runs perfectly in the end. If it is not yet perfect, it is not yet the end.

Geoffry Roberts
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install the java package.

Philip Nienhuis
Geoffry Roberts wrote
All,

What can I do?

I have just installed the binary version of Octave on my OSX machine.
Following the instructions, I checked for the java package

>> pkg list

showed java 1.2.9 was installed

I tried

>> s = javaObject ("java.lang.String", "Hello OctaveString")

error: javaObject: Octave was not compiled with Java interface

I did

>> pkg uninstall java

>> setenv ("JAVA_HOME",
"/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home")

>> pkg install -forge java

Error while trying to install Java package:

JAVA_HOME environment variable does not properly point to a JDK

  Hint:

  JAVA_HOME should usually be set such that either:

  (on *nix:)

    <JAVA_HOME>/jre/lib/<arch>/client/ contains libjvm.so (file or symlink)

  (on OSX:)

    <JAVA_HOME>/../Libraries/ contains a file libclient.dylib


I did the following because it is the only jdk I have installed that
has libclient.dylib
in it:



>> setenv ("JAVA_HOME",
"/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries")


Then I did:

>> pkg install -forge java

./configure: line 3257: test: -n: integer expression expected

configure: WARNING: this package requires at least Java-1.5

warning: function /Users/gcr/octave/java-1.2.9/errordlg.m shadows a core
library function


But when I try:


>> s = javaObject ("java.lang.String", "Hello OctaveString")

error: javaObject: Octave was not compiled with Java interface


I'm back to where I started from.


What can I do?  Is there a manual install I can do?

I have:

OSX 10.9.2
java 1.7.0_55
octave 3.8.0

Snip>

My software always runs perfectly in the end. If it is not yet perfect, it
is not yet the end.
Not quite :-)

Last summer someone managed to install the OF Java package under OSX on Octave-3.6.x (search the ML, I think it was Pascal Dupuis).

However, in 3.8.0 the OF Java package cannot be installed anymore, as Java support became a core Octave feature rather than an add-on. IOW, Java has to be built in during building Octave itself. TTBOMK no one has succeeded doing that for OSX yet.
Maybe you can try building Octave from scratch and include Java along the way outlined in the thread mentioned above.
Other than that, I'm afraid you're SOL.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install the java package.

Sebastian Schöps
Philip Nienhuis wrote
However, in 3.8.0 the OF Java package cannot be installed anymore, as Java support became a core Octave feature rather than an add-on. IOW, Java has to be built in during building Octave itself. TTBOMK no one has succeeded doing that for OSX yet.
Maybe you can try building Octave from scratch and include Java along the way outlined in the thread mentioned above.
I am using the latest homebrew formula to compile a checkout of octave. Java (Version 8)  works out of the box:

>>v = javaObject ("java.util.Vector")
v =

<Java object: java.util.Vector>

>> v.add(12);
>>  v.get(0)
ans =  12

Seb.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to install the java package.

Philip Nienhuis
Sebastian Schöps wrote
Philip Nienhuis wrote
However, in 3.8.0 the OF Java package cannot be installed anymore, as Java support became a core Octave feature rather than an add-on. IOW, Java has to be built in during building Octave itself. TTBOMK no one has succeeded doing that for OSX yet.
Maybe you can try building Octave from scratch and include Java along the way outlined in the thread mentioned above.
I am using the latest homebrew formula to compile a checkout of octave. Java (Version 8)  works out of the box:

>>v = javaObject ("java.util.Vector")
v =

<Java object: java.util.Vector>

>> v.add(12);
>>  v.get(0)
ans =  12
Nice! Java support used to be a problem on OSX.
Thanks for this info,

Philip