java and jhandles... revisited

View: New views
16 Messages — Rating Filter:   Alert me  

java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everyone. I just started using Octave. I want to do a simple GUI for FEM modelling (I will do it for a class, and afterwards, I dream of uploading my results to the community). I have used Matlab extensively before, but now I want to do things the right way: open-source.
Well, the issue is that I have tried to install jhandles for some days now without any positive results. First of all, I think that the java package from octave-forge (java-1.2.6.tar.gz) is failing to install. I run

octave:4> pkg install /home/edgar/Programas/Temp/java-1.2.6.tar.gz
octave:5>

Although it seems to install properly (there are no warnings nor anything), I can't run java commands:

octave:5> l = java_new('java.util.LinkedList')
error: `java_new' undefined near line 5 column 5

So what I thought was that I could probably install it from the terminal. Therefore, I unpacked the tar.gz file to a folder, and did the following:

----------Block start---------------
~/java-1.2.6$ sudo ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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... mkoctfile
retrieving compile and link flags from mkoctfile
checking for F77_FUNC... yes
checking for octave... octave
checking for OCTAVE_VERSION in Octave... 3.2.2
checking for octave_config_info('canonical_host_type') in Octave... x86_64-unknown-linux-gnu
checking for octave_config_info('SHLEXT') in Octave... so
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for java... java
checking for javac... javac
checking for jar... jar
checking for Java version... 1.6.0_0
configure: creating ./config.status
config.status: creating Makeconf
 
  "$prefix" is /home/edgar/octave/java-1.2.6
  "$exec_prefix" is ${prefix}

octave commands will install into the following directories:
   m-files:   /usr/local/share/octave/3.2.2/site/m/octave-forge
   oct-files: /usr/local/libexec/octave/3.2.2/site/oct/x86_64-unknown-linux-gnu/octave-forge
   binaries:  /usr/local/libexec/octave/3.2.2/site/exec/x86_64-unknown-linux-gnu
alternatives:
   m-files:   /usr/local/share/octave/3.2.2/site/octave-forge-alternatives/m
   oct-files: /usr/local/libexec/octave/3.2.2/site/octave-forge-alternatives/oct/x86_64-unknown-linux-gnu

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:      octave (version 3.2.2)
   mkoctfile: mkoctfile for Octave 2
   java:        Java Development Kit not found
----------Block end---------------

As you can see, it fails to find JDK. I can assure that I have installed JDK (open-jdk and sun-jdk):

$ ls /usr/lib/jvm/
default-java  java-6-openjdk  java-6-sun  java-6-sun-1.6.0.16

One would say: well everything that he has to do is modify ~/.bashrc . I have tried it with several flavors, but the most recent is:

$ sudo nano ~/.bashrc
(added in to the file): export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

I picked this version because of this:

$ locate libjvm.so
/usr/lib/gcj-4.3-90/libjvm.so
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/cacao/libjvm.so
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so

So, I come to you dear people trying to get an answer to my pledge. Please, do help me! Many thanks (my configuration is UBUNTU 9.04, 64 bits, Dell Optiplex 755)

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 9, 2009 at 11:51 PM, Hielos <efrios@...> wrote:

> As you can see, it fails to find JDK. I can assure that I have installed JDK
> (open-jdk and sun-jdk):
>
> $ ls /usr/lib/jvm/
> default-java  java-6-openjdk  java-6-sun  java-6-sun-1.6.0.16
>
> One would say: well everything that he has to do is modify ~/.bashrc . I
> have done tried it with several flavors, but the most recent is:
>
> $ sudo nano ~/.bashrc
> (added in to the file): export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
>
> I picked this version because of this:
>
> $ locate libjvm.so
> /usr/lib/gcj-4.3-90/libjvm.so
> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/cacao/libjvm.so
> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so

Can you try to following?

In a shell:
test -d $JAVA_HOME/jre/lib/amd64 && echo "got it!"

In octave:
getenv("JAVA_HOME")

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael, this is the result (positive):

$ test -d $JAVA_HOME/jre/lib/amd64 && echo "got it"
got it

I also ran the octave command:

octave:1> getenv("JAVA_HOME")
ans = /usr/lib/jvm/java-6-openjdk/

Michael Goffioul-2 wrote:
Can you try to following?

In a shell:
test -d $JAVA_HOME/jre/lib/amd64 && echo "got it!"

In octave:
getenv("JAVA_HOME")

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It seems your environment is correct. I'm a little bit puzzled, as it *should*
work. In this case, I think the best would be to unpack the package source,
go into src/ subdir, run ./configure manually and check config.log for anything
relevant (or try to see why the configure script fails to detect your JDK).

Michael.


On Fri, Sep 11, 2009 at 4:02 PM, Hielos <efrios@...> wrote:

>
> Michael, this is the result (positive):
>
> $ test -d $JAVA_HOME/jre/lib/amd64 && echo "got it"
> got it
>
> I also ran the octave command:
>
> octave:1> getenv("JAVA_HOME")
> ans = /usr/lib/jvm/java-6-openjdk/
>
>
> Michael Goffioul-2 wrote:
>>
>> Can you try to following?
>>
>> In a shell:
>> test -d $JAVA_HOME/jre/lib/amd64 && echo "got it!"
>>
>> In octave:
>> getenv("JAVA_HOME")
>>
>> Michael.
>>
>> _______________________________________________
>> Bug-octave mailing list
>> Bug-octave@...
>> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>>
>>
>
> --
> View this message in context: http://www.nabble.com/java-and-jhandles...-revisited-tp25374487p25402674.html
> Sent from the Octave - Bugs mailing list archive at Nabble.com.
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, I am sending you the config.log which I obtained after unpacking the java-1.2.6.tar.gz file into a folder I called "java-1.2.6" (as you may know there is a 'configure' file in the root folder and another one within 'src' the root folder):

java-1.2.6/src$  sudo ./configure
// MANY LINES OF RESULT //config.output

java-1.2.6/src$ gedit config.log
// SEE ATTACHED FILE //config.log

However, I don't know what to do next (I am not very Linux-skilled). As you can see, I also attached the './configure' prompt output just in case that it helps...

Michael Goffioul-2 wrote:
It seems your environment is correct. I'm a little bit puzzled, as it *should*
work. In this case, I think the best would be to unpack the package source,
go into src/ subdir, run ./configure manually and check config.log for anything
relevant (or try to see why the configure script fails to detect your JDK).

Michael.
_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Søren Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

fre, 11 09 2009 kl. 11:51 -0700, skrev Hielos:
> Well, I am sending you the config.log which I obtained after unpacking the
> java-1.2.6.tar.gz file into a folder I called "java-1.2.6" (as you may know
> there is a 'configure' file in the root folder and another one within 'src'
> the root folder):

The following patch fixes things for me on Ubuntu. I can't compile the
package, but that seems to be an issue with my setup.

Søren

--- configure.base 2009-06-07 12:44:44.000000000 +0200
+++ /home/sh/Skrivebord/java-1.2.6/src/configure.base 2009-09-11
21:48:18.000000000 +0200
@@ -343,6 +343,9 @@
             # you need to explicitely set the include path
             JAVA_INCS="-I${JAVA_HOME}/include"
             HAVE_JAVA=yes
+          # This is the Debian default path
+          elif test -d "/usr/lib/jvm/default-java"; then
+            JAVA_HOME=/usr/lib/jvm/default-java
           else
             JAVA_HOME=/usr/lib/jvm
           fi


_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looking at your config.log (near the end), you'll see that the JAVA_HOME
variable is wrong (/usr/lib/jvm). This may indicate that the configure script
does not have it correctly defined: it looks like the configure script detects
it as empty and use the default value.

This might be due to the "sudo" call. I'm not sure this inherit the environment
variables from the parent shell.

Michael.


On Fri, Sep 11, 2009 at 7:51 PM, Hielos <efrios@...> wrote:

>
> Well, I am sending you the config.log which I obtained after unpacking the
> java-1.2.6.tar.gz file into a folder I called "java-1.2.6" (as you may know
> there is a 'configure' file in the root folder and another one within 'src'
> the root folder):
>
> java-1.2.6/src$  sudo ./configure
> // MANY LINES OF RESULT //
> http://www.nabble.com/file/p25406474/config.output config.output
>
> java-1.2.6/src$ gedit config.log
> // SEE ATTACHED FILE // http://www.nabble.com/file/p25406474/config.log
> config.log
>
> However, I don't know what to do next (I am not very Linux-skilled). As you
> can see, I also attached the './configure' prompt output just in case that
> it helps...
>
>
> Michael Goffioul-2 wrote:
>>
>> It seems your environment is correct. I'm a little bit puzzled, as it
>> *should*
>> work. In this case, I think the best would be to unpack the package
>> source,
>> go into src/ subdir, run ./configure manually and check config.log for
>> anything
>> relevant (or try to see why the configure script fails to detect your
>> JDK).
>>
>> Michael.
>> _______________________________________________
>> Bug-octave mailing list
>> Bug-octave@...
>> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>>
>>
>
> --
> View this message in context: http://www.nabble.com/java-and-jhandles...-revisited-tp25374487p25406474.html
> Sent from the Octave - Bugs mailing list archive at Nabble.com.
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael, I did the following:

   $ sudo su
   $ gedit /root/.bashrc

Then I modified the '.bashrc' file to include the lines:

   export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
   export JAVA_ARCH=amd64

After that:

   $ cd /java-1.2.6/src
   $ ./configure

And I got the same JDK issue as before. I also checked the 'config.log' file, and it shows

   ...
   JAVA_HOME='/usr/lib/jvm/java-6-openjdk'
   ...
config.log

It is a shame, but I cannot spend more time trying to figure this out. Thanks a lot for you help. I hope that someone can fix it eventually. Godspeed.


Michael Goffioul-2 wrote:
Looking at your config.log (near the end), you'll see that the JAVA_HOME
variable is wrong (/usr/lib/jvm). This may indicate that the configure script
does not have it correctly defined: it looks like the configure script detects
it as empty and use the default value.

This might be due to the "sudo" call. I'm not sure this inherit the environment
variables from the parent shell.

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, mate, I did as you proposed, but it did not work for me :) . I will have to live without octave (or octave-java at least). Thanks for your help ;)

Søren Hauberg wrote:
fre, 11 09 2009 kl. 11:51 -0700, skrev Hielos:
> Well, I am sending you the config.log which I obtained after unpacking the
> java-1.2.6.tar.gz file into a folder I called "java-1.2.6" (as you may know
> there is a 'configure' file in the root folder and another one within 'src'
> the root folder):

The following patch fixes things for me on Ubuntu. I can't compile the
package, but that seems to be an issue with my setup.

Søren

--- configure.base 2009-06-07 12:44:44.000000000 +0200
+++ /home/sh/Skrivebord/java-1.2.6/src/configure.base 2009-09-11
21:48:18.000000000 +0200
@@ -343,6 +343,9 @@
             # you need to explicitely set the include path
             JAVA_INCS="-I${JAVA_HOME}/include"
             HAVE_JAVA=yes
+          # This is the Debian default path
+          elif test -d "/usr/lib/jvm/default-java"; then
+            JAVA_HOME=/usr/lib/jvm/default-java
           else
             JAVA_HOME=/usr/lib/jvm
           fi


_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You shouldn't define JAVA_ARCH yourself. The configure script won't
work correctly if you do (Ijust realized that).

Michael.


On Mon, Sep 14, 2009 at 2:48 AM, Hielos <efrios@...> wrote:

>
> Michael, I did the following:
>
>   $ sudo su
>   $ gedit /root/.bashrc
>
> Then I modified the '.bashrc' file to include the lines:
>
>   export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
>   export JAVA_ARCH=amd64
>
> After that:
>
>   $ cd /java-1.2.6/src
>   $ ./configure
>
> And I got the same JDK issue as before. I also checked the 'config.log'
> file, and it shows
>
>   ...
>   JAVA_HOME='/usr/lib/jvm/java-6-openjdk'
>   ...
> http://www.nabble.com/file/p25429191/config.log config.log
>
> It is a shame, but I cannot spend more time trying to figure this out.
> Thanks a lot for you help. I hope that someone can fix it eventually.
> Godspeed.
>
>
>
> Michael Goffioul-2 wrote:
>>
>> Looking at your config.log (near the end), you'll see that the JAVA_HOME
>> variable is wrong (/usr/lib/jvm). This may indicate that the configure
>> script
>> does not have it correctly defined: it looks like the configure script
>> detects
>> it as empty and use the default value.
>>
>> This might be due to the "sudo" call. I'm not sure this inherit the
>> environment
>> variables from the parent shell.
>>
>> Michael.
>>
>> _______________________________________________
>> Bug-octave mailing list
>> Bug-octave@...
>> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>>
>>
>
> --
> View this message in context: http://www.nabble.com/java-and-jhandles...-revisited-tp25374487p25429191.html
> Sent from the Octave - Bugs mailing list archive at Nabble.com.
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Now the './configure' command works, but 'make' gives an error 1:
$ sudo su
$ cd java-1.2.6/src
$ ./configure
...
octave-forge is configured with
   octave:      octave (version 3.2.2)
   mkoctfile: mkoctfile for Octave 2
   java:        yes
...
config.log

$ make
make.output

---Some useful translations---
conversión obsoleta de una constante de cadena a ‘char*’ = obsolete string conversion to 'char*'
no tiene un miembro llamado = doesn't have a member called
no es un miembro de = is not a member of
make.trans
---End of translations---

Michael Goffioul-2 wrote:
You shouldn't define JAVA_ARCH yourself. The configure script won't
work correctly if you do (Ijust realized that).

Michael.
_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is already fixed in SVN, see
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/java/src/__java__.cc?r1=5371&r2=6098
In summary:
- add "include <iostream>"
- replace capacity() with length()
- replace qsort() with sort()

Michael.


On Mon, Sep 14, 2009 at 9:50 PM, Hielos <efrios@...> wrote:

>
> Now the './configure' command works, but 'make' gives an error 1:
> $ sudo su
> $ cd java-1.2.6/src
> $ ./configure
> ...
> octave-forge is configured with
>   octave:      octave (version 3.2.2)
>   mkoctfile:   mkoctfile for Octave 2
>   java:        yes
> ...
> http://www.nabble.com/file/p25443402/config.log config.log
>
> $ make
> http://www.nabble.com/file/p25443402/make.output make.output
>
> ---Some useful translations---
> conversión obsoleta de una constante de cadena a ‘char*’ = obsolete string
> conversion to 'char*'
> no tiene un miembro llamado = doesn't have a member called
> no es un miembro de = is not a member of
> http://www.nabble.com/file/p25443402/make.trans make.trans
> ---End of translations---
>
>
> Michael Goffioul-2 wrote:
>>
>> You shouldn't define JAVA_ARCH yourself. The configure script won't
>> work correctly if you do (Ijust realized that).
>>
>> Michael.
>> _______________________________________________
>> Bug-octave mailing list
>> Bug-octave@...
>> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>>
>>
>
> --
> View this message in context: http://www.nabble.com/java-and-jhandles...-revisited-tp25374487p25443402.html
> Sent from the Octave - Bugs mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fantastic! I have octave-java installed.

  octave:1> help java_new

works. But

  octave:1> l = java_new('java.util.LinkedList')
  error: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/libjvm.so: cannot open shared object file: No such file or directory

So what I did was:
  $ mkdir /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/
  $ ln -s /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server/libjvm.so /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/libjvm.so

and now
  octave:1> l = java_new('java.util.LinkedList')
  l =

  <Java object: java.util.LinkedList>


Therefore, I am trying to install jhandles:
  $ ./configure
  ...
  octave-forge is configured with
     octave:      octave (version 3.2.2)
     mkoctfile: mkoctfile for Octave 2
     java:        Can not find jogl.jar
     octave.jar: /usr/local/share/octave/packages/java-1.2.6/octave.jar
     jogl.jar:    jogl.jar
  ...
config.log

It seems rather familiar, but I don't know how to solve it. Please, help!


Michael Goffioul-2 wrote:
This is already fixed in SVN, see
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/java/src/__java__.cc?r1=5371&r2=6098
In summary:
- add "include <iostream>"
- replace capacity() with length()
- replace qsort() with sort()

Michael.
______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 15, 2009 at 12:03 AM, Hielos <efrios@...> wrote:

>
> Fantastic! I have octave-java installed.
>
>  octave:1> help java_new
>
> works. But
>
>  octave:1> l = java_new('java.util.LinkedList')
>  error: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/libjvm.so: cannot
> open shared object file: No such file or directory
>
> So what I did was:
>  $ mkdir /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/
>  $ ln -s /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server/libjvm.so
> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/client/libjvm.so
>
> and now
>  octave:1> l = java_new('java.util.LinkedList')
>  l =
>
>  <Java object: java.util.LinkedList>
> :jumping:
>
> Therefore, I am trying to install jhandles:
>  $ ./configure
>  ...
>  octave-forge is configured with
>     octave:      octave (version 3.2.2)
>     mkoctfile: mkoctfile for Octave 2
>     java:        Can not find jogl.jar
>     octave.jar:        /usr/local/share/octave/packages/java-1.2.6/octave.jar
>     jogl.jar:    jogl.jar
>  ...
> http://www.nabble.com/file/p25445171/config.log config.log
>
> It seems rather familiar, but I don't know how to solve it. Please, help!

Currently, the configure script expects to find JOGL jar files somewhere in
your PATH. So make sure this is the case.

Moreover, you'll also need to
add the path where JOGL shared libs (.so) are located to your
LD_LIBRARY_PATH variable. Although you probably don't need it for
configure/make stages.

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Hielos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Since I don't know where the JOGL shared libraries are, I looked it up on the ubuntu package list (http://packages.ubuntu.com/search?suite=default§ion=all&arch=any&searchon=names&keywords=jogl) and found this: http://packages.ubuntu.com/jaunty/amd64/libjogl-jni/filelist .
So I went back to the terminal:
   $ locate libjogl.so
   /usr/lib/jni/libjogl.so

Then, I modified my '.bashrc':
  export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
  export PATH=$PATH:$JAVA_HOME
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/

After that, I tried to run (in octave):
   octave:1> pkg install /home/edgar/Programas/Temp/jhandles-0.3.5.tar.gz
   error: A(I) = X: X must have the same size as I
   error: called from:
   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 2007, column 21
   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 301, column 7
   make: *** [all] Error 255
   'make' returned the following error: make: se ingresa al directorio `/tmp/oct-POCkd9/jhandles-0.3.5/src'
   Java support not compiled
   make: se sale del directorio `/tmp/oct-POCkd9/jhandles-0.3.5/src'
   error: called from `pkg>configure_make' in file /usr/local/share/octave/3.2.2/m/pkg/pkg.m near line 1253, column 2
   error: called from:
   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 714, column 5
   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 287, column 7

I don't think that's very useful to anyone, so I went back to the terminal:
   $ cd jhandles-0.3.5/src
   jhandles-0.3.5/src $  ./configure
   ...
   checking for java package in Octave... error: A(I) = X: X must have the same size as I
   ...
   octave-forge is configured with
   octave:      octave (version 3.2.2)
   mkoctfile: mkoctfile for Octave 2
   java:        Could not find octave.jar
   octave.jar:
   jogl.jar:
   ...
   config.log

I tried the same thing as root (modified .bashrc and ran ./configure) with not a positive result, although a bit different:
config.root

Are the new environment variables ok? What else could be the problem?

Michael Goffioul-2 wrote:
Currently, the configure script expects to find JOGL jar files somewhere in
your PATH. So make sure this is the case.

Moreover, you'll also need to
add the path where JOGL shared libs (.so) are located to your
LD_LIBRARY_PATH variable. Although you probably don't need it for
configure/make stages.

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@octave.org
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: java and jhandles... revisited

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 20, 2009 at 3:57 AM, Hielos <efrios@...> wrote:

>
> Since I don't know where the JOGL shared libraries are, I looked it up on the
> ubuntu package list
> (http://packages.ubuntu.com/search?suite=default§ion=all&arch=any&searchon=names&keywords=jogl)
> and found this: http://packages.ubuntu.com/jaunty/amd64/libjogl-jni/filelist
> .
> So I went back to the terminal:
>   $ locate libjogl.so
>   /usr/lib/jni/libjogl.so
>
> Then, I modified my '.bashrc':
>  export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
>  export PATH=$PATH:$JAVA_HOME
>  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/
>
> After that, I tried to run (in octave):
>   octave:1> pkg install /home/edgar/Programas/Temp/jhandles-0.3.5.tar.gz
>   error: A(I) = X: X must have the same size as I
>   error: called from:
>   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 2007, column
> 21
>   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 301, column 7
>   make: *** [all] Error 255
>   'make' returned the following error: make: se ingresa al directorio
> `/tmp/oct-POCkd9/jhandles-0.3.5/src'
>   Java support not compiled
>   make: se sale del directorio `/tmp/oct-POCkd9/jhandles-0.3.5/src'
>   error: called from `pkg>configure_make' in file
> /usr/local/share/octave/3.2.2/m/pkg/pkg.m near line 1253, column 2
>   error: called from:
>   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 714, column 5
>   error:   /usr/local/share/octave/3.2.2/m/pkg/pkg.m at line 287, column 7
>
> I don't think that's very useful to anyone, so I went back to the terminal:
>   $ cd jhandles-0.3.5/src
>   jhandles-0.3.5/src $  ./configure
>   ...
>   checking for java package in Octave... error: A(I) = X: X must have the
> same size as I
>   ...
>   octave-forge is configured with
>   octave:      octave (version 3.2.2)
>   mkoctfile:   mkoctfile for Octave 2
>   java:        Could not find octave.jar
>   octave.jar:
>   jogl.jar:
>   ...

That's strange as the octave.jar detection used to work for
you before. What you actually need as setup is the following:

export PATH=$PATH:/usr/share/java
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

You shouldn't need to set LD_LIBRARY_PATH for building
the package. You only need it at runtime. Note also that
instead of adding /usr/share/java to your PATH, you can
also try to simply copy gluegen-rt.jar and jogl.jar to
/usr/bin.

Michael.

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave