Problem installing Java package - Octave version

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

Problem installing Java package - Octave version

Joao Rodrigues
I want to use package io which I tried to install as (inside the
interpreter):

pkg install -forge io

But then when I tried to use xlsread no interfaces were founded.
Googling suggested that the java package should also be installed and
load before the io one. I promptly typed:

pkg install -forge java

And got a lot of errors starting with:

Error while trying to install Java package:
environment variable 'JAVA_HOME' has not been set.
   use 'setenv ("JAVA_HOME", "/full/path/to/javaJDK")'
   Hint:
   JAVA_HOME should usually be set such that either:
   (on *nix:)
     <JAVA_HOME>/jre/lib/<arch>/client/ contains libjvm.so (file or symlink)

I went to the root in another terminal and did:

sudo find . -name 'libjvm.so'

and found:

./usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
./usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/lib/libjvm.so
./usr/lib/x86_64-linux-gnu/gcj-4.9-15/libjvm.so

Then back at the interpreter:

setenv ("/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/",
"/full/path/to/javaJDK")
pkg install -forge java

or

setenv ("/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/lib/",
"/full/path/to/javaJDK")
pkg install -forge java

or

setenv ("/usr/lib/x86_64-linux-gnu/gcj-4.9-15/", "/full/path/to/javaJDK")
pkg install -forge java

But I always got the same error. Is the "/full/path/to/javaJDK" also a
place holder to be replaced with something else? Some other dependency
missing?

System: Ubuntu 14.10, Octave 3.8.1

Help appreciated




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing Java package - Octave version

Joao Rodrigues

On 20-11-14 09:35, Joao Rodrigues wrote:
> I want to use package io which I tried to install as (inside the
> interpreter):

I wanted to use this read an xls file.

Reading this (http://wiki.octave.org/IO_package) made me think that it
would be less painful to convert the files to xlsx and work from there.

So problem solved (or avoided, to be more precise).

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing Java package - Octave version

Mike Miller
In reply to this post by Joao Rodrigues
On Thu, Nov 20, 2014 at 09:35:25 +0100, Joao Rodrigues wrote:
> I want to use package io which I tried to install as (inside the
> interpreter):
>
> pkg install -forge io
> [..]
> pkg install -forge java
> [..]
> System: Ubuntu 14.10, Octave 3.8.1

Good that you found a resolution on your own, but is there a reason
why you are installing packages with `pkg` instead of with `apt-get`
or your Ubuntu package manager of choice?

  sudo apt-get install octave-io

should have given you a working io package.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem installing Java package - Octave version

Philip Nienhuis
In reply to this post by Joao Rodrigues
Joao Rodrigues wrote
I want to use package io which I tried to install as (inside the
interpreter):

pkg install -forge io

But then when I tried to use xlsread no interfaces were founded.
Googling suggested that the java package should also be installed and
load before the io one. I promptly typed:

pkg install -forge java

And got a lot of errors starting with:

<snip>

System: Ubuntu 14.10, Octave 3.8.1
You can't successfully install the Java package in Octave >= 3.8.0.
Since 3.8.0, Java support should have been built in Octave itself.

What does: (from an Octave prompt)

octave_config_info ("features").JAVA

tell you?
If the answer is 1, you might need some support SW, notably Java class libs+ maybe even a Java JRE.
See the wiki:
http://wiki.octave.org/IO_package

If 0, you're out of luck.
That is, then you can still read/write .xlsx, .ods and .gnumeric files but no .xls. Apart from the io package you need no other dependencies for that.

Philip