Discussion:
Java package install seems to be ok, but is NOT working.
Herdon
2013-01-11 07:17:53 UTC
Permalink
I have Windows XP sp3 32 bit and Octave 3.6.2 gcc4.6.2.
I downloaded package java-1.2.9.tar.gz and managed to install it after
playing with JAVA_HOME variable.

Command pkg list shows that java is installed, and I issued command pkg load
java, but after that java commands does not seem to be working.
What happens is like this:
octave:3> v = javaObject ("java.util.Vector")
warning: the `javaObject' function is not yet implemented in Octave

octave:3> javamem
error: `java_invoke' undefined near line 65 column 8
error: called from:
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6

So, what might be the problem?



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763.html
Sent from the Octave - General mailing list archive at Nabble.com.
s***@tech-chat.de
2013-01-11 12:17:26 UTC
Permalink
Post by Herdon
I have Windows XP sp3 32 bit and Octave 3.6.2 gcc4.6.2.
I downloaded package java-1.2.9.tar.gz and managed to install it after
playing with JAVA_HOME variable.
Command pkg list shows that java is installed, and I issued command pkg load
java, but after that java commands does not seem to be working.
octave:3> v = javaObject ("java.util.Vector")
warning: the `javaObject' function is not yet implemented in Octave
octave:3> javamem
error: `java_invoke' undefined near line 65 column 8
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
So, what might be the problem?
Hi Heron,
have you installed the octave-forge packages as described in the README?
See
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20MinGW%20installer/
Chapter 3. Manual installation instructions for the Octave-forge packages

I've installed octave3.6.2_gcc4.6.2 and Octave3.6.2_gcc4.6.2_pkgs_20120613.7z as
described in the README on a WindowsXP Pro 32bit
(don't forget the pkg rebuild steps) and the java packages works like a charm:
octave:1> v = javaObject ("java.util.Vector")
v =
<Java object: java.util.Vector>
octave:2> javamem
Java virtual machine (JVM) memory info:
Maximum available memory: 63 MiB;
(...running garbage collector...)
OK, current status:
Total memory in virtual machine: 4 MiB;
Free memory in virtual machine: 4 MiB;
4 CPUs available.
octave:3>

Best regards, Andy
Philip Nienhuis
2013-01-11 14:59:34 UTC
Permalink
Post by Herdon
I have Windows XP sp3 32 bit and Octave 3.6.2 gcc4.6.2.
I downloaded package java-1.2.9.tar.gz and managed to install it after
playing with JAVA_HOME variable.
Command pkg list shows that java is installed, and I issued command pkg
load java, but after that java commands does not seem to be working.
octave:3> v = javaObject ("java.util.Vector")
warning: the `javaObject' function is not yet implemented in Octave
octave:3> javamem
error: `java_invoke' undefined near line 65 column 8
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
So, what might be the problem?
The problem is that the package hasn't been installed properly.

On Windows the issue is that not only JAVA_HOME must be set, but also the
Java JDK executables (javac.exe (Java compiler), jar.exe (Java archiver))
must be in the PATH. If you would have added the -verbose flag to the pkg.m
command you would have seen something like "Java: no" somewhere in the
build messages.

So before another retry to install the Java package, add the subdirectory

%JAVA_HOME%\bin

to the PATH and try again.

FYI: this *IS* outlined on the wiki:
http://wiki.octave.org/Java_package#Make_sure_that_the_build_environment_is_configured_properly

Philip




--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648775.html
Sent from the Octave - General mailing list archive at Nabble.com.
bmgamm
2013-01-14 17:31:28 UTC
Permalink
Hello,

I'm having the same problem as Herdon. I installed the java package as per
the instructions on the wiki link Philip posted. The installation seems to
work but the javaObject error persists when I run the test code on the wiki
page ("warning: the `javaObject' function is not yet implemented in Octave
"). I get the same error for several other functions in the java package
(java_invoke, java_exit, etc.) When I look in the folder where the package
was installed, "C:\Program Files
(x86)\Octave-3.6.2\share\octave\packages\java-1.2.9," some of the functions
that were listed on the Octave-Forge website,
http://octave.sourceforge.net/java/overview.html, are missing. These
functions include those, such as javaObject, that produced an error. Might
this be a the source of the problem? If not, any other solutions would be
appreciated. Thanks!

Brian



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648856.html
Sent from the Octave - General mailing list archive at Nabble.com.
Jordi Gutiérrez Hermoso
2013-01-14 17:53:13 UTC
Permalink
Post by bmgamm
I'm having the same problem as Herdon. I installed the java package as per
the instructions on the wiki link Philip posted. The installation seems to
work but the javaObject error persists when I run the test code on the wiki
page ("warning: the `javaObject' function is not yet implemented in Octave
")
The error message isn't lying. The functionality you seek isn't implemented yet.

- Jordi G. H.
Jordi Gutiérrez Hermoso
2013-01-14 17:54:16 UTC
Permalink
Post by Jordi Gutiérrez Hermoso
Post by bmgamm
I'm having the same problem as Herdon. I installed the java package as per
the instructions on the wiki link Philip posted. The installation seems to
work but the javaObject error persists when I run the test code on the wiki
page ("warning: the `javaObject' function is not yet implemented in Octave
")
The error message isn't lying. The functionality you seek isn't implemented yet.
Oh, my mistake. It supposedly is? Never mind me, sorry.

- Jordi G. H.
Philip Nienhuis
2013-01-15 13:39:22 UTC
Permalink
Post by bmgamm
Hello,
I'm having the same problem as Herdon. I installed the java package as per
the instructions on the wiki link Philip posted. The installation seems to
work but the javaObject error persists when I run the test code on the
wiki page ("warning: the `javaObject' function is not yet implemented in
Octave "). I get the same error for several other functions in the java
package (java_invoke, java_exit, etc.) When I look in the folder where the
package was installed, "C:\Program Files
(x86)\Octave-3.6.2\share\octave\packages\java-1.2.9," some of the
functions that were listed on the Octave-Forge website,
http://octave.sourceforge.net/java/overview.html, are missing. These
functions include those, such as javaObject, that produced an error. Might
this be a the source of the problem? If not, any other solutions would be
appreciated. Thanks!
Did you load the Java package after installation?
pkg load java

If you did and some Java functions are still lacking, the package is simply
mis-installed.

I don't know how you installed the Java package; what I would do is more or
less along these lines:

1. Check Windows PATH for the <JAVA_HOME>\bin directory
(In my case this is an entry like
.....;C:\Programs\Java\jdk1.6.0_33\bin;....... where ..... stands for rest
of PATH entries); in your case it might be something like ...;C:\Program
Files (X86)\Java\bin;.... )
Note that you might need a 32-bit version of the Java JDK. I'm unsure about
that, I can't check that on my remote 64bit work box now as I cannot login
from Linux lately.
Note also that 64-bit Java versions may have the jvm.dll in .../server, not
.../client. AFAIU this is only relevant on Linux, but again I'm not sure.

2. In a cmd32.exe terminal, do "javac -version" (without double quotes).
You should get a response from the Java compiler, echoeing its version
number. If not, fix step 1. above

3. Start up Octave, do
setenv ("JAVA_HOME", "/full/path/to/Java-JDK/WITH/FORWARD/SLASHES")

4. Switch off the pager, so that you can copy all messages into an email if
needed:
more off

5. In Octave install the Java package:
pkg install -forge -verbose java
(this will install from Octave-Forge and give some more feedback on the
build process)

6. Check the build messages for a line saying "Java....: yes" (scroll back
if needed)
If you see something like "Java....: not found" your JAVA_HOME setting is
wrong; fix it in step 3.

The java-1.2.9 package features a file called preinstall.m which should
check for (and as far as possible fix) most of the above issues. If it
doesn't complain I wouldn't know how to fix your problems without a more
detailed report containing:
- Your JAVA_HOME setting (preferrably echoed from Octave: getenv
("JAVA_HOME")
- Your Windows PATH
- The output of
javac -version
from a cmd32.exe window
- The output (messages) from the pkg install command (see steps 4/5/6)

I'm afraid this is about all I can do to help out.

Philip




--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648879.html
Sent from the Octave - General mailing list archive at Nabble.com.
Herdon
2013-01-16 09:05:35 UTC
Permalink
I removed old java installation, and restarted Octave.

PATH has all the time contained this (only java related item in my PATH):
C:\Program Files\Java\jdk1.6.0_03\bin;

In command prompt:
C:\>javac -version
javac 1.6.0_03

Then in octave:
octave:1> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.6.0_03/")
octave:2> system ('javac -version 2> nul')
ans = 0
octave:3> more off
octave:4> pkg install -forge -verbose java
mkdir (C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and Settings\localadmin\java-1.2.9.tar.gz,
C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
For information about changes from previous versions of the java package,
run 'news ("java")'.
octave:5> s = javaObject ("java.lang.String", "Hello OctaveString")
warning: the `javaObject' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.


error: `javaObject' undefined near line 5 column 5

Then I realized I did not load the package, but it did not help:
octave:5> pkg load java
octave:6> s = javaObject ("java.lang.String", "Hello OctaveString")
warning: the `javaObject' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.


error: `javaObject' undefined near line 6 column 5


So, in principle, everything seems to be ok, but nothing is working. Any
more ideas?



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648909.html
Sent from the Octave - General mailing list archive at Nabble.com.
PhilipNienhuis
2013-01-16 19:31:19 UTC
Permalink
Post by Herdon
I removed old java installation, and restarted Octave.
C:\Program Files\Java\jdk1.6.0_03\bin;
...which -assuming you run Win7 64-bit- is the 64-bit version of the JDK.
Post by Herdon
C:\>javac -version
javac 1.6.0_03
octave:1> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.6.0_03/")
...also pointing to the 64-bit version.
Post by Herdon
octave:2> system ('javac -version 2> nul')
ans = 0
octave:3> more off
octave:4> pkg install -forge -verbose java
mkdir (C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and Settings\localadmin\java-1.2.9.tar.gz,
C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
Where is the rest of the messages? I'd expect some 4-5 screens of messages,
not just those 2 lines....
Post by Herdon
For information about changes from previous versions of the java package,
run 'news ("java")'.
octave:5> s = javaObject ("java.lang.String", "Hello OctaveString")
warning: the `javaObject' function is not yet implemented in Octave
Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.
<snip>
So, in principle, everything seems to be ok, but nothing is working. Any
more ideas?
I checked on my 64-bit Win7 box at work. I have both the 64-bit and 32-bit
version of the Java JDK installed (both seem to work BTW), and I've probably
used the 32-bit version to build the Java package, the one in (on that box)
C:\Program Files (X86)\Java\jdk1.7.0_07

So my advice is -again, assuming you run Win7 64-bit- to also install a
32-bit JDK and use that in JAVA_HOME and PATH to build the Java package.

Philip




--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648919.html
Sent from the Octave - General mailing list archive at Nabble.com.
Herdon
2013-01-16 20:20:35 UTC
Permalink
My system is Windows XP sp3, 32 bit.

My previous posting contained all messages Octave gave, copied directly from
prompt, and pasted here. There was absolutely nothing more.

BUT, I have to say that I have NOT compiled anything, but installed Octave
from the ready made package from here:
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/





--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648920.html
Sent from the Octave - General mailing list archive at Nabble.com.
Philip Nienhuis
2013-01-18 11:08:20 UTC
Permalink
Post by Herdon
My system is Windows XP sp3, 32 bit.
My previous posting contained all messages Octave gave, copied directly
from prompt, and pasted here. There was absolutely nothing more.
BUT, I have to say that I have NOT compiled anything, but installed Octave
http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/
Very intruiging.
Does your Octave installation have deviating write permissions?

Another possibility may be that the old Java package wasn't completely
removed because it was in use (might be because some Java class libs (.jar)
have been loaded while starting Octave, in that case some shared libs may be
in memory blocking removal of those library files on disk).

What you can do is some advanced but ugly surgery (tested on my local
Octave-3.6.2-gcc4.6.2 installation, WinXP SP3 like you):

-----start Octave & uninstall Java package:-----
pkg unload java
pkg uninstall java

-----quit Octave-----
----- Now, in the octave directory, go to
1. lib/octave/packages/
2. share/octave/packages/
and manually wipe any remaining java directories there ----

----- start Octave and clean up package list-----
pkg rebuild

----- quit Octave, and start Octave again. Check that no Java package is
installed:-----
pkg list

----- Prepare JAVA_HOME & PATH (note: locations & version may obviously
differ) + do some checks:-----

octave:2> setenv ("JAVA_HOME", "c:/programs/java/jdk1.6.0_33")
## In below command note single quotes to avoid interpreting backslash
octave:3> setenv ("PATH", [getenv("JAVA_HOME") '\bin' pathsep
getenv("PATH")])
octave:4> strsplit (getenv("PATH"), pathsep)
ans =
{
[1,1] = c:/programs/java/jdk1.6.0_33\bin
[1,2] = C:\WINDOWS\system32
[1,3] = C:\WINDOWS
[1,4] = C:\WINDOWS\System32\Wbem
[1,5] = C:\Programs\TortoiseSVN\bin
:
<snip>
:
octave:5> system ("javac -version")
javac 1.6.0_33
ans = 0

----- Install Java 1.2.9 from SourceForge-----
octave:6> pkg install -forge -auto -verbose java
mkdir (C:\Home\Philip\LOCALS~1\Temp\oct-2)
untar (C:\Home\Philip\MyDocs\octave\java-1.2.9.tar.gz,
C:\Home\Philip\LOCALS~1\Temp\oct-2)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile...
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
retrieving compile and link flags from
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
checking for F77_FUNC... yes
checking for octave...
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2
checking for OCTAVE_VERSION in Octave... 3.6.2
checking for octave_config_info('canonical_host_type') in Octave...
i686-pc-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... no, using cp -p
checking for ranlib... ranlib
checking for strip... strip
checking for java... /c/programs/java/jdk1.6.0_33/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: creating ./config.status
config.status: creating Makeconf

"$prefix" is
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/share/octave/packages/java-1.2.9
"$exec_prefix" is ${prefix}

octave commands will install into the following directories:
m-files: /c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/m/octave-forge
oct-files:
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/oct/i686-pc-mingw32/octave-forge
binaries:
/c/OctaveB/octave-3.6.2/libexec/octave/3.6.2/site/exec/i686-pc-mingw32
alternatives:
m-files:
/c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/octave-forge-alternatives/m
oct-files:
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/octave-forge-alternatives/oct/i686-pc-mingw32

shell commands will install into the following directories:
binaries: ${exec_prefix}/bin
man pages: ${datarootdir}/man
libraries: ${exec_prefix}/lib
headers: ${prefix}/include

octave-forge is configured with
octave: C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2
(version 3.6.2)
mkoctfile: C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
for Octave 2
java: yes

find . -name NOINSTALL -print # shows which toolboxes won't be installed

make: Entering directory `/tmp/oct-2/java/src'
if [ "Xi386X" = "XX" ]; then \
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
-DHAVE_OCTAVE_36 -v -DJAVAPKG_BUILD -Ic:/programs/java/jdk1.6.0_33/include
-Ic:/programs/java/jdk1.6.0_33/include/win32 -o __java__.oct __java__.cc
-ladvapi32; \
else \
C:/Programs/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
-DHAVE_OCTAVE_36 -v -DJAVAPKG_BUILD -DJAVA_ARCH=\\\"i386\\\"
-DJAVA_HOME=\\\"c:/programs/java/jdk1.6.0_33\\\" -Ic:/programs/
java/jdk1.6.0_33/include -Ic:/programs/java/jdk1.6.0_33/include/win32 -o
__java__.oct __java__.cc -ladvapi32; \
fi
g++ -shared-libgcc -c -I/c/OctaveB/gplibs/include
-I/c/OctaveB/OctaveLibs/include -I/c/OctaveB/GnuWin32/include
-Ic:\Programs\Octave\Octave3.6.2_gcc4.6.2\include\octave-3.6.2\octave\..
-Ic:\Programs\Octave\Octave3.6.2_gcc4.6.2\include\octave-3.6.2\octave
-Ic:\Programs\Octave\Octave3.6.2_gcc4.6.2\include -mieee-fp
-Ic:/OctaveB/gplibs/include/freetype2 -Ic:/OctaveB/gplibs/include
-IC:/OctaveB/gplibs/include -g -O2
-Ic:/programs/java/jdk1.6.0_33/include
-Ic:/programs/java/jdk1.6.0_33/include/win32 -DHAVE_OCTAVE_36
-DJAVAPKG_BUILD -DJAVA_ARCH=\"i386\"
-DJAVA_HOME=\"c;C:\Programs\Octave\Octave3.6.2_gcc4.6.2\msys\programs\java\jdk1.6.0_33\"
__java__.cc -o __java__.o
g++ -shared-libgcc -shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-runtime-pseudo-reloc -o __java__.oct __java__.o -ladvapi32
-Lc:\Programs\Octave\Octave3.6.2_gcc4.6.2\lib\octave\3.6.2
-Lc:\Programs\Octave\Octave3.6.2_gcc4.6.2\lib -loctinterp -loctave -lcruft
/c/programs/java/jdk1.6.0_33/bin/javac -source 1.3 -target 1.3
org/octave/ClassHelper.java org/octave/OctClassLoader.java
org/octave/Octave.java org/octave/OctaveReference.java
org/octave/Matrix.java org/octave/JDialogBox.java
org/octave/DlgListener.java org/octave/TeXtranslator.java
org/octave/TeXcode.java
rm -f octave.jar
/c/programs/java/jdk1.6.0_33/bin/jar cf octave.jar
org/octave/ClassHelper.class org/octave/OctClassLoader.class
org/octave/Octave.class org/octave/OctaveReference.class
org/octave/Matrix.class org/octave/JDialogBox.class
org/octave/DlgListener.class org/octave TeXtranslator.class
org/octave/TeXcode.class org/octave/images/question.png org/octave/images
error.png org/octave/images/warning.png org/octave/images/information.png
org/octave/images octave.png
make: Leaving directory `/tmp/oct-2/java/src'
copyfile C:\Home\Philip\LOCALS~1\Temp\oct-2\java\src\__java__.h
C:\Home\Philip\LOCALS~1\Temp\oct-2\j
ava\src\octave.jarC:\Home\Philip\LOCALS~1\Temp\oct-2\java\inst
copyfile C:\Home\Philip\LOCALS~1\Temp\oct-2\java\src\__java__.oct
C:\Home\Philip\LOCALS~1\Temp\oct-2\java\inst\i686-pc-mingw32-api-v48+
For information about changes from previous versions of the java package,
run 'news ("java")'.

## Note the "java: yes" line above, you'll only get that when JAVA_HOME is
set and
## the Java executables are found
octave:7> javamem

Java virtual machine (JVM) memory info:
Maximum available memory: 247 MiB;
(...running garbage collector...)
OK, current status:
Total memory in virtual machine: 15 MiB;
Free memory in virtual machine: 15 MiB;
2 CPUs available.
octave:7>


If all this doesn't help you, I'm out of ideas.

Philip



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4648954.html
Sent from the Octave - General mailing list archive at Nabble.com.
Herdon
2013-01-24 06:19:00 UTC
Permalink
Thank you for the instructions. I followed them as precisely as I could, but
obviously something is wrong.
Here is what happened in Octave after I had done steps to remove java
package installation:
-------------------------------------------------------------------------------------------
octave:3> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.6.0_03")
octave:4> setenv ("PATH", [getenv("JAVA_HOME") '\bin' pathsep
getenv("PATH")])
octave:5> strsplit (getenv("PATH"), pathsep)
ans =
{
[1,1] = C:/Program Files/Java/jdk1.6.0_03\bin
....(the rest of path is snipped)...
}
octave:6> system ("javac -version")
javac 1.6.0_03
ans = 0
octave:7> pkg install -forge -auto -verbose java
mkdir (C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and Settings\localadmin\java-1.2.9.tar.gz,
C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
For information about changes from previous versions of the java package,
run 'news ("java")'.
octave:8> javamem
error: `java_invoke' undefined near line 65 column 8
error: called from:
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
-------------------------------------------------------------------------------------------

Somehow it seems that pkg install command does not do very much, because
there is only two lines of resulting information after that. In your example
there was much much more!

Could it be that I should have never Java installed, or maybe there is just
something wrong with my computer?



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4649073.html
Sent from the Octave - General mailing list archive at Nabble.com.
Philip Nienhuis
2013-01-24 20:18:46 UTC
Permalink
Post by Herdon
Thank you for the instructions. I followed them as precisely as I could,
but obviously something is wrong.
Here is what happened in Octave after I had done steps to remove java
-------------------------------------------------------------------------------------------
octave:3> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.6.0_03")
octave:4> setenv ("PATH", [getenv("JAVA_HOME") '\bin' pathsep
getenv("PATH")])
octave:5> strsplit (getenv("PATH"), pathsep)
ans =
{
[1,1] = C:/Program Files/Java/jdk1.6.0_03\bin
....(the rest of path is snipped)...
}
octave:6> system ("javac -version")
javac 1.6.0_03
ans = 0
OK, so the Java executables are in the PATH, which -given above commands-
implies that JAVA_HOME is set correctly.
Post by Herdon
octave:7> pkg install -forge -auto -verbose java
mkdir (C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and Settings\localadmin\java-1.2.9.tar.gz,
C:\DOCUME~1\LOCALA~1\LOCALS~1\Temp\oct-2)
?
Yeah.. where's the rest....
Post by Herdon
For information about changes from previous versions of the java package,
run 'news ("java")'.
octave:8> javamem
error: `java_invoke' undefined near line 65 column 8
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
-------------------------------------------------------------------------------------------
Somehow it seems that pkg install command does not do very much, because
there is only two lines of resulting information after that. In your
example there was much much more!
Could it be that I should have never Java installed, or maybe there is
just something wrong with my computer?
About the only remaining thing might be that your Java installation is
screwed up.

You've got path level 03 (1.6.0_03), I already got 33 (> 1 year old) and
AFAIK level 37 has been out for a while.
It's a good idea anyway to upgrade your Java JDK to the newest version, by
first uninstalling the current one and then installing the newer version.
Let's pray that it will solve your Java package problem.

Other than that...... I have no more suggestions... except for reinstalling
Octave.

Well that is, I have avoided spaces in various system paths: my
%Programfilesdir% = C:\Programs and where you have the IMO infinitely stupid
Windows default C:\Documents and Settings\ I simply have C:\Home\
But I never saw reports that spaces in those paths induce trouble, expect
when Octave is installed in C:\Program Files\ (you didn't, no?)

Philip






--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4649080.html
Sent from the Octave - General mailing list archive at Nabble.com.
nitnit
2013-01-24 22:02:27 UTC
Permalink
Post by Herdon
octave:8> javamem
error: `java_invoke' undefined near line 65 column 8
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
Philip Nienhuis
2013-01-27 22:08:00 UTC
Permalink
Post by Herdon
octave:8> javamem
error: `java_invoke' undefined near line 65 column 8
error: C:\Program
Files\Octave362\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9\javamem.m
at line 65, column 6
Nusnus
2013-02-18 22:36:44 UTC
Permalink
Dear All,

I am having the same issue and here is a copy of the prompt:


octave:1> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.6.0_03")
octave:2> setenv ("JAVA_HOM")
octave:3> setenv ("JAVA_HOME", "C:/Program Files/Java/jdk1.7.0_13")
octave:4> setenv ("PATH", [getenv('PATH') pathsep 'C:/Program
Files/Java/jdk1.7.0_13/bin'])
octave:5> strsplit (getenv("PATH"), pathsep)
ans =
{
[1,1] = C:\Program Files\Java\jdk1.7.0_13\bin
[1,2] = C:\Program Files\NVIDIA Corporation\PhysX\Common
[1,3] = C:\Perl\site\bin
[1,4] = C:\Perl\bin
[1,5] = C:\WINDOWS\system32
[1,6] = C:\WINDOWS
[1,7] = C:\WINDOWS\System32\Wbem
[1,8] = C:\Program Files\Fichiers communs\DivX Shared\
[1,9] = C:\Program Files\GTK2-Runtime\bin
[1,10] = C:\Program Files\QuickTime\QTSystem\
[1,11] = C:\Program Files\MiKTeX 2.8\miktex\bin
[1,12] = C:\Program Files\SSH Communications Security\SSH Secure Shell
[1,13] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\3.6.2\site\exec\i686-pc-mingw32
[1,14] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\api-v48+\site\exec\i686-pc-mingw32
[1,15] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\site\exec\i686-pc-mingw32
[1,16] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\3.6.2\exec\i686-pc-mingw32
[1,17] = C:\Octave\Octave3.6.2_gcc4.6.2\bin
[1,18] = C:\Octave\Octave3.6.2_gcc4.6.2\gnuplot\bin
[1,19] = C:\Octave\Octave3.6.2_gcc4.6.2\mingw32\bin
[1,20] = C:\Octave\Octave3.6.2_gcc4.6.2\msys\bin
[1,21] = C:\Octave\Octave3.6.2_gcc4.6.2\gs\gs9.05\bin
[1,22] = C:\Octave\Octave3.6.2_gcc4.6.2\pstoedit
[1,23] = C:\Octave\Octave3.6.2_gcc4.6.2\fig2dev
[1,24] = C:/Program Files/Java/jdk1.7.0_13/bin
}
octave:6> system ("javac -version")
javac 1.7.0_13
ans = 0
octave:7> pkg install -forge -auto -verbose java
mkdir (C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and Settings\Administrateur\java-1.2.9.tar.gz,
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\oct-2)
./configure: line 3257: test: too many arguments
configure: WARNING: this package requires at least Java-1.5
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile... C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
retrieving compile and link flags from
C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
checking for F77_FUNC... yes
checking for octave... C:/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2
checking for OCTAVE_VERSION in Octave... 3.6.2
checking for octave_config_info('canonical_host_type') in Octave...
i686-pc-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... no, using cp -p
checking for ranlib... ranlib
checking for strip... strip
checking for java... /c/Program Files/Java/jdk1.7.0_13/bin/java
checking for javac... /c/Program Files/Java/jdk1.7.0_13/bin/javac
checking for jar... /c/Program Files/Java/jdk1.7.0_13/bin/jar
checking for Java version...
configure: creating ./config.status
config.status: creating Makeconf

"$prefix" is
C:/Octave/Octave3.6.2_gcc4.6.2/share/octave/packages/java-1.2.9
"$exec_prefix" is ${prefix}

octave commands will install into the following directories:
m-files: /c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/m/octave-forge
oct-files:
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/oct/i686-pc-mingw32/octave-forge
binaries:
/c/OctaveB/octave-3.6.2/libexec/octave/3.6.2/site/exec/i686-pc-mingw32
alternatives:
m-files:
/c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/octave-forge-alternatives/m
oct-files:
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/octave-forge-alternatives/oct/i686-pc-mingw32

shell commands will install into the following directories:
binaries: ${exec_prefix}/bin
man pages: ${datarootdir}/man
libraries: ${exec_prefix}/lib
headers: ${prefix}/include

octave-forge is configured with
octave: C:/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2 (version
3.6.2)
mkoctfile: C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2 for
Octave 2
java: Java Development Kit not found

find . -name NOINSTALL -print # shows which toolboxes won't be installed

make: Entering directory `/tmp/oct-2/java/src'
Java support not compiled
make: Leaving directory `/tmp/oct-2/java/src'
For information about changes from previous versions of the java package,
run 'news ("java")'.
octave:8> pkg list
Package Name | Version | Installation directory
--------------+---------+-----------------------
java *| 1.2.9 |
C:\Octave\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9
octave:9> s = javaObject ("java.lang.String", "Hello OctaveString")
warning: the `javaObject' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.


error: `javaObject' undefined near line 9 column 5
octave:9> pkg load java
octave:10> s = javaObject ("java.lang.String", "Hello OctaveString")
warning: the `javaObject' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.


error: `javaObject' undefined near line 10 column 5


I am really desperate to get this working, hope you can help




--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4649965.html
Sent from the Octave - General mailing list archive at Nabble.com.
Sergei Steshenko
2013-02-19 03:40:51 UTC
Permalink
Subject: Re: Java package install seems to be ok, but is NOT working.
Date: Monday, February 18, 2013, 2:36 PM
Dear All,
I am having the same issue and here is a copy of the
octave:1> setenv ("JAVA_HOME", "C:/Program
Files/Java/jdk1.6.0_03")
octave:2> setenv ("JAVA_HOM")
octave:3> setenv ("JAVA_HOME", "C:/Program
Files/Java/jdk1.7.0_13")
octave:4> setenv ("PATH", [getenv('PATH') pathsep
'C:/Program
Files/Java/jdk1.7.0_13/bin'])
octave:5> strsplit (getenv("PATH"), pathsep)
ans =
{
  [1,1] = C:\Program Files\Java\jdk1.7.0_13\bin
  [1,2] = C:\Program Files\NVIDIA
Corporation\PhysX\Common
  [1,3] = C:\Perl\site\bin
  [1,4] = C:\Perl\bin
  [1,5] = C:\WINDOWS\system32
  [1,6] = C:\WINDOWS
  [1,7] = C:\WINDOWS\System32\Wbem
  [1,8] = C:\Program Files\Fichiers communs\DivX
Shared\
  [1,9] = C:\Program Files\GTK2-Runtime\bin
  [1,10] = C:\Program Files\QuickTime\QTSystem\
  [1,11] = C:\Program Files\MiKTeX 2.8\miktex\bin
  [1,12] = C:\Program Files\SSH Communications
Security\SSH Secure Shell
  [1,13] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\3.6.2\site\exec\i686-pc-mingw32
  [1,14] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\api-v48+\site\exec\i686-pc-mingw32
  [1,15] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\site\exec\i686-pc-mingw32
  [1,16] =
C:\Octave\Octave3.6.2_gcc4.6.2\libexec\octave\3.6.2\exec\i686-pc-mingw32
  [1,17] = C:\Octave\Octave3.6.2_gcc4.6.2\bin
  [1,18] = C:\Octave\Octave3.6.2_gcc4.6.2\gnuplot\bin
  [1,19] = C:\Octave\Octave3.6.2_gcc4.6.2\mingw32\bin
  [1,20] = C:\Octave\Octave3.6.2_gcc4.6.2\msys\bin
  [1,21] =
C:\Octave\Octave3.6.2_gcc4.6.2\gs\gs9.05\bin
  [1,22] = C:\Octave\Octave3.6.2_gcc4.6.2\pstoedit
  [1,23] = C:\Octave\Octave3.6.2_gcc4.6.2\fig2dev
  [1,24] = C:/Program Files/Java/jdk1.7.0_13/bin
}
octave:6> system ("javac -version")
javac 1.7.0_13
ans = 0
octave:7> pkg install -forge -auto -verbose java
mkdir (C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\oct-2)
untar (C:\Documents and
Settings\Administrateur\java-1.2.9.tar.gz,
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\oct-2)
./configure: line 3257: test: too many arguments
configure: WARNING: this package requires at least Java-1.5
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile...
C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
retrieving compile and link flags from
C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
checking for F77_FUNC... yes
checking for octave...
C:/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2
checking for OCTAVE_VERSION in Octave... 3.6.2
checking for octave_config_info('canonical_host_type') in
Octave...
i686-pc-mingw32
checking for octave_config_info('SHLEXT') in Octave... dll
checking whether ln -s works... no, using cp -p
checking for ranlib... ranlib
checking for strip... strip
checking for java... /c/Program
Files/Java/jdk1.7.0_13/bin/java
checking for javac... /c/Program
Files/Java/jdk1.7.0_13/bin/javac
checking for jar... /c/Program
Files/Java/jdk1.7.0_13/bin/jar
checking for Java version...
configure: creating ./config.status
config.status: creating Makeconf
  "$prefix" is
C:/Octave/Octave3.6.2_gcc4.6.2/share/octave/packages/java-1.2.9
  "$exec_prefix" is ${prefix}
octave commands will install into the following
   m-files:   /c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/m/octave-forge
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/oct/i686-pc-mingw32/octave-forge
/c/OctaveB/octave-3.6.2/libexec/octave/3.6.2/site/exec/i686-pc-mingw32
   m-files: 
/c/OctaveB/octave-3.6.2/share/octave/3.6.2/site/octave-forge-alternatives/m
/c/OctaveB/octave-3.6.2/lib/octave/3.6.2/site/octave-forge-alternatives/oct/i686-pc-mingw32
   binaries:  ${exec_prefix}/bin
   man pages: ${datarootdir}/man
   libraries: ${exec_prefix}/lib
   headers:   ${prefix}/include
octave-forge is configured with
   octave:     
C:/Octave/Octave3.6.2_gcc4.6.2/bin/octave-3.6.2 (version
3.6.2)
   mkoctfile:   C:/Octave/Octave3.6.2_gcc4.6.2/bin/mkoctfile-3.6.2
for
Octave 2
   java:        Java
Development Kit not found
find . -name NOINSTALL -print    # shows which
toolboxes won't be installed
make: Entering directory `/tmp/oct-2/java/src'
Java support not compiled
make: Leaving directory `/tmp/oct-2/java/src'
For information about changes from previous versions of the
java package,
run 'news ("java")'.
octave:8> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
        java *|   1.2.9
|
C:\Octave\Octave3.6.2_gcc4.6.2\share\octave\packages\java-1.2.9
octave:9> s = javaObject ("java.lang.String", "Hello
OctaveString")
warning: the `javaObject' function is not yet implemented in
Octave
Please read `http://www.octave.org/missing.html' to
learn how you can
contribute missing functionality.
error: `javaObject' undefined near line 9 column 5
octave:9> pkg load java
octave:10> s = javaObject ("java.lang.String", "Hello
OctaveString")
warning: the `javaObject' function is not yet implemented in
Octave
Please read `http://www.octave.org/missing.html' to
learn how you can
contribute missing functionality.
error: `javaObject' undefined near line 10 column 5
I am really desperate to get this working, hope you can
help
I am neither Octave no Windows developer.

The first error message is
"
java: Java Development Kit not found
".

And above I see:
"
[1,24] = C:/Program Files/Java/jdk1.7.0_13/bin
".

Well, the rule of thumb is to avoid whitespaces in paths - because shells and whitespaces are not friends - whitespace are used as characters to split on.

So I would first uninstall Java and reinstall it in a manner there are no whitespaces in the paths, e.g. create

C:\MySpecialJava

folder and install Java into it.

Regards,
Sergei.
Werner
2013-09-09 21:52:39 UTC
Permalink
Hell List,

Sergei is right at all. I have had the same problems and my assumption was
exactly like Sergei's
So I decided to make a new java installation (the current installations was
in any event old - jdk1.6.0_31)
My system is windows 7 and so the installation was in c:\Program Files\Java
... Keep in mind the
whitespace in path. With this settings you get an error, when you install
java with
pkg install -verbose java-1.2.9.tar.gz. You have carefully check the
output, there is the message that
the make file can't found c:\Program Files\Java ... So I install the new jdk
(jdk1.7.0_25), but in the
installation process I "correct" the path from c:\Program Files to
c:\ProgramFiles (it's a little bit strange
for a windows 7 system). Therefor my output from strsplit (getenv("PATH"),
pathsep) contains now
[1,7] = c:\ProgramFiles\Java\jdk1.7.0_25\bin\ and that was what I wanted ->
no whitespace in the path.
When you now install java with pkg, then all is correct.

So long Werner



--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4657178.html
Sent from the Octave - General mailing list archive at Nabble.com.
PhilipNienhuis
2013-09-09 22:38:15 UTC
Permalink
Post by Werner
Hell List,
Sergei is right at all. I have had the same problems and my assumption was
exactly like Sergei's
So I decided to make a new java installation (the current installations
was in any event old - jdk1.6.0_31)
My system is windows 7 and so the installation was in c:\Program
Files\Java ... Keep in mind the
whitespace in path. With this settings you get an error, when you install
java with
pkg install -verbose java-1.2.9.tar.gz. You have carefully check the
output, there is the message that
the make file can't found c:\Program Files\Java ... So I install the new
jdk (jdk1.7.0_25), but in the
installation process I "correct" the path from c:\Program Files to
c:\ProgramFiles (it's a little bit strange
for a windows 7 system). Therefor my output from strsplit
(getenv("PATH"), pathsep) contains now
[1,7] = c:\ProgramFiles\Java\jdk1.7.0_25\bin\ and that was what I wanted
-> no whitespace in the path.
When you now install java with pkg, then all is correct.
So long Werner
Another issue I hit is that on my 64-bit Win7 box at work, Octave (32-bit)
doesn't like the 64-bit JavaJDK; not even with the trick of copying the
./server/ directory to the ./client/ directory (the Java package expects
jvm.dll to be in ....../client)

I explicitly had to wipe the 64-bit JDK and install a 32-bit JDK. It doesn't
matter that the latter is somewhere in C:\Program Files (X86)\ (enough
spaces, isn't it?).

My experience on Windows is that it is vital for Octave itself to be
installed in a path w/o spaces. But support SW (Java, Ghostscript, etc) in
e.g., C:\Program Files\ is often recognized properly by Octave. Mind you:
YMMV.

Philip




--
View this message in context: http://octave.1599824.n4.nabble.com/Java-package-install-seems-to-be-ok-but-is-NOT-working-tp4648763p4657179.html
Sent from the Octave - General mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...