Opened 13 years ago

Closed 11 years ago

#30866 closed defect (fixed)

octave-java not working

Reported by: ForTozs Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: lion Cc: mark@…
Port: octave-java

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I tried sudo port install octave-java on my OS X 10.7 Lion machine. It built OK, but the java functions do not appear to be working. For example:

octave:1> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
        java *|   1.2.6 | /opt/local/share/octave/packages/java-1.2.6
octave:2> help java_new
error: help: `java_new' not found
octave:2> java_invoke("java.lang.System","currentTimeMillis")
error: `java_invoke' undefined near line 2 column 1
octave:2> exit

I have also tried building java-1.2.8 but get the same problem. I have sought help on the octave board, and their best guess is that it involves a problem with the Java directory structure on Lion. Flags such as JAVA_HOME, JAVA_LIBS, JAVA_INC, etc. might be obsolete. Does anyone have any ideas?

Change History (5)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: java octave removed
Port: octave-java added

Remember to use WikiFormatting and to preview before submitting, and to fill in the Port field.

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Does other Java stuff work on your machine? Lion doesn't come with a JVM installed by default; you have to install it separately. It offers to install it if you try to run any of the tools like javac.

comment:3 Changed 12 years ago by mark@…

Cc: mark@… added

Cc Me!

comment:4 Changed 12 years ago by mark@…

I'd like to add that I have the same issue with Snow Leopard and octave-java 1.2.8. The same JDK and JAR work fine from MATLAB 2012a.

$ export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"

$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-10M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)

$ javac Test.java                                                         
$ java Test
Hello, world!

$ octave
Octave was configured for "x86_64-apple-darwin10.7.3".

octave-3.4.0:1> javaaddpath('/Users/oceanoptics/OmniDriver/OOI_HOME/OmniDriver.jar');
error: `java_invoke' undefined near line 41 column 15
error: called from:
error:   /Users/oceanoptics/octave/java-1.2.8/javaaddpath.m at line 41, column 13

octave-3.4.0:1> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
        java *|   1.2.8 | /Users/oceanoptics/octave/java-1.2.8

octave-3.4.0:2> pkg install java-1.2.8.tar.gz
./configure: line 3257: test: too many arguments
configure: WARNING: this package requires at least Java-1.5

octave-3.4.0:3> quit
error: feval: function `java_exit' not found

comment:5 Changed 11 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Please do:

sudo port clean octave-java
sudo port selfupdate

and then try installing it again. Should be fixed with r114034.

Note: See TracTickets for help on using tickets.