Trouble installing Java and Jhandles

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

Trouble installing Java and Jhandles

by Telescope_Nerd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all
I have been struggling with installing the java and jhandles packages in octave 3.0. I tried again recently with the newer versions of the packages (java-1.2.3 and jhandles-0.3.2) These still didn't work but the error message is more verbose so now I have some more info. Specifically when installing Java-1.2.3 i get the make error:

make: *** No rule to make target `__java__.lib', needed by `all'. Stop.

does anyone know what might cause this error and how I can fix it?

Simon

Re: Trouble installing Java and Jhandles

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2/23/08, Telescope_Nerd <srb2242@...> wrote:

>
> Hi all
> I have been struggling with installing the java and jhandles packages in
> octave 3.0. I tried again recently with the newer versions of the packages
> (java-1.2.3 and jhandles-0.3.2) These still didn't work but the error
> message is more verbose so now I have some more info. Specifically when
> installing Java-1.2.3 i get the make error:
>
> make: *** No rule to make target `__java__.lib', needed by `all'. Stop.
>
> does anyone know what might cause this error and how I can fix it?

Remove '__java__.lib' from PROGS definition in src/Makefile
(unpack the source package, modify the file, repack the sources).
I'll commit a fix on SVN soon.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Telescope_Nerd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael
Thanks vey much for your help so far, each small piece of advice you have given me seems to have had some effect. But I still don't have Jhandles working In linux. It seems to me that installing and configuring Java and Jogl to work with jhandles in linux is a highly non-trivial task and there are no usefull instructions out there for how to do this. So I have two questions:

1. Has anyone ever actually had jhandles running in linux and how much of a task was it to get there?

2. Can you or somebody please release a step by step for dummies like me on how to set up java and jogl to run jhandles?  

I have used it on windows and know it's a great addition to Octave, I would love to able to use it on Linux and i'm sure i'm not the only person who's having trouble with this because it seems like you need to have the level of knowledge required to develop a package like jhandles in the first place to be able to install it!
Thanks
Simon  

Michael Goffioul-2 wrote:
On 2/23/08, Telescope_Nerd <srb2242@gmail.com> wrote:
>
> Hi all
> I have been struggling with installing the java and jhandles packages in
> octave 3.0. I tried again recently with the newer versions of the packages
> (java-1.2.3 and jhandles-0.3.2) These still didn't work but the error
> message is more verbose so now I have some more info. Specifically when
> installing Java-1.2.3 i get the make error:
>
> make: *** No rule to make target `__java__.lib', needed by `all'. Stop.
>
> does anyone know what might cause this error and how I can fix it?

Remove '__java__.lib' from PROGS definition in src/Makefile
(unpack the source package, modify the file, repack the sources).
I'll commit a fix on SVN soon.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@octave.org
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2/28/08, Telescope_Nerd <srb2242@...> wrote:

>
> Michael
> Thanks vey much for your help so far, each small piece of advice you have
> given me seems to have had some effect. But I still don't have Jhandles
> working In linux. It seems to me that installing and configuring Java and
> Jogl to work with jhandles in linux is a highly non-trivial task and there
> are no usefull instructions out there for how to do this. So I have two
> questions:
>
> 1. Has anyone ever actually had jhandles running in linux and how much of a
> task was it to get there?

Yes, David Bateman has done it.

> 2. Can you or somebody please release a step by step for dummies like me on
> how to set up java and jogl to run jhandles?

I don't use Linux, so it's difficult for me to give a complete description.
However, I can try to give some hints:
- JHandles has only been tested with Sun JDK, so it's better to use it; from
David's experience, the recommended version is 1.6
- David didn't use the pre-compiled packages of JOGL, but recompiled it
from source (this requires a few additional packages, but avoids any
library incompatibility). The jar files have been installed somewhere in
PATH (for instance /usr/bin) and the libraries have been installed somewhere
in LD_LIBRARY_PATH.
- When compiling Java or JHandles packages, you should pre-define
JAVA_HOME to the actual location of Sun JVM library: if the client JVM
is installed in /my/java/dir/jre/lib/i386/client/libjvm.so (replace i386 with
your actual architecture), then define JAVA_HOME to /my/java/dir
- When compiling Java or JHandles packages, be sure that "java" and
"javac" corresponds to Sun JDK; it happened to a few people that the
eclipse java compiler was used instead.

Hope this helps.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Khaled () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Michael,

   I liked the code and it was really helpful, although it did not work, but I learned many things.
first of all, I compiled it on a Dell Inspiron 1300 and I succeeded to install it on Linux (OpenSuSE 10.3), but I had to do some tricks in the configure file and the make file, for instant:
   
at 4231 for jhandles ver 0.3.2:
HAVE_OCTAVE_JAVA=`echo "pkg('load','java');disp('yes');" | octave -qf`
returns exactly yes, however the check at the next line (if test "$HAVE_OCTAVE_JAVA" = "yes"; then) fails!! probably that is because the variable  HAVE_OCTAVE_JAVA was not successfully updated. Therefore, I changed it to some thing like hard coded yes!! and then it works and it got the Makefile changed as well. There I removed the "-l __java__"

Afterwards, it was installed in octave. However, I got this two notes:
" Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details."

More over, there is no (*) beside the  package name, for example:

Package Name  | Version | Installation directory
--------------+---------+-----------------------
     general *|   1.0.5 | /usr/local/share/octave/packages/general-1.0.5
        java *|   1.2.3 | /usr/local/share/octave/packages/java-1.2.3
    jhandles  |   0.3.2 | /usr/local/share/octave/packages/jhandles-0.3.2

this means, that I can not recall any of the jhandles function.

I don't know what to do, may be I just need to learn how I could use the jhandles in octave as I learned how to install it :)

I hope you could solve this problem for me

Thanks

Yours

Khaled Hassan


Michael Goffioul-2 wrote:
On 2/28/08, Telescope_Nerd <srb2242@gmail.com> wrote:
>
> Michael
> Thanks vey much for your help so far, each small piece of advice you have
> given me seems to have had some effect. But I still don't have Jhandles
> working In linux. It seems to me that installing and configuring Java and
> Jogl to work with jhandles in linux is a highly non-trivial task and there
> are no usefull instructions out there for how to do this. So I have two
> questions:
>
> 1. Has anyone ever actually had jhandles running in linux and how much of a
> task was it to get there?

Yes, David Bateman has done it.

> 2. Can you or somebody please release a step by step for dummies like me on
> how to set up java and jogl to run jhandles?

I don't use Linux, so it's difficult for me to give a complete description.
However, I can try to give some hints:
- JHandles has only been tested with Sun JDK, so it's better to use it; from
David's experience, the recommended version is 1.6
- David didn't use the pre-compiled packages of JOGL, but recompiled it
from source (this requires a few additional packages, but avoids any
library incompatibility). The jar files have been installed somewhere in
PATH (for instance /usr/bin) and the libraries have been installed somewhere
in LD_LIBRARY_PATH.
- When compiling Java or JHandles packages, you should pre-define
JAVA_HOME to the actual location of Sun JVM library: if the client JVM
is installed in /my/java/dir/jre/lib/i386/client/libjvm.so (replace i386 with
your actual architecture), then define JAVA_HOME to /my/java/dir
- When compiling Java or JHandles packages, be sure that "java" and
"javac" corresponds to Sun JDK; it happened to a few people that the
eclipse java compiler was used instead.

Hope this helps.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@octave.org
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/2/08, Khaled <kshawky@...> wrote:

>
> Dear Michael,
>
>   I liked the code and it was really helpful, although it did not work, but
> I learned many things.
> first of all, I compiled it on a Dell Inspiron 1300 and I succeeded to
> install it on Linux (OpenSuSE 10.3), but I had to do some tricks in the
> configure file and the make file, for instant:
>
> at 4231 for jhandles ver 0.3.2:
> HAVE_OCTAVE_JAVA=`echo "pkg('load','java');disp('yes');" | octave -qf`
> returns exactly yes, however the check at the next line (if test
> "$HAVE_OCTAVE_JAVA" = "yes"; then) fails!! probably that is because the
> variable  HAVE_OCTAVE_JAVA was not successfully updated.

Well, it should be updated. If the test fails, this maybe means that
the previous command returned "yes" plus some other non-printable
characters that you don't see, but makes the test fail. I used to have
such problem when running octave within a terminal that couldn't
handle all control sequences.

> Therefore, I
> changed it to some thing like hard coded yes!! and then it works and it got
> the Makefile changed as well. There I removed the "-l __java__"

You can safely do that. This is not used for the moment.

> Afterwards, it was installed in octave. However, I got this two notes:
> " Note: Some input files use or override a deprecated API.
>  Note: Recompile with -Xlint:deprecation for details."

You can safely ignore that. These are just warnings.

> More over, there is no (*) beside the  package name, for example:
>
> Package Name  | Version | Installation directory
> --------------+---------+-----------------------
>     general *|   1.0.5 | /usr/local/share/octave/packages/general-1.0.5
>        java *|   1.2.3 | /usr/local/share/octave/packages/java-1.2.3
>    jhandles  |   0.3.2 | /usr/local/share/octave/packages/jhandles-0.3.2
>
> this means, that I can not recall any of the jhandles function.

Yes. JHandles package is not autoloaded. Either use the -autoload
switch when installing it, or simply type 'pkg load jhandles'.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Khaled :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello again,

   Thanks for your prompt answer :)

  I tried "pkg load jhandles", Octave breaks when ever I call any plotting command. It also through this exception, :

" octave: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Aborted
"
It is mainly java error, however the basic features of the java pkg is working, as I tasted:
"a = javaArray ("java.lang.String", 2, 2);"

it works well.

I don't know how to correct this error.

Best

Khaled
Michael Goffioul-2 wrote:
On 3/2/08, Khaled <kshawky@gmx.net> wrote:
>
> Dear Michael,
>
>   I liked the code and it was really helpful, although it did not work, but
> I learned many things.
> first of all, I compiled it on a Dell Inspiron 1300 and I succeeded to
> install it on Linux (OpenSuSE 10.3), but I had to do some tricks in the
> configure file and the make file, for instant:
>
> at 4231 for jhandles ver 0.3.2:
> HAVE_OCTAVE_JAVA=`echo "pkg('load','java');disp('yes');" | octave -qf`
> returns exactly yes, however the check at the next line (if test
> "$HAVE_OCTAVE_JAVA" = "yes"; then) fails!! probably that is because the
> variable  HAVE_OCTAVE_JAVA was not successfully updated.

Well, it should be updated. If the test fails, this maybe means that
the previous command returned "yes" plus some other non-printable
characters that you don't see, but makes the test fail. I used to have
such problem when running octave within a terminal that couldn't
handle all control sequences.

> Therefore, I
> changed it to some thing like hard coded yes!! and then it works and it got
> the Makefile changed as well. There I removed the "-l __java__"

You can safely do that. This is not used for the moment.

> Afterwards, it was installed in octave. However, I got this two notes:
> " Note: Some input files use or override a deprecated API.
>  Note: Recompile with -Xlint:deprecation for details."

You can safely ignore that. These are just warnings.

> More over, there is no (*) beside the  package name, for example:
>
> Package Name  | Version | Installation directory
> --------------+---------+-----------------------
>     general *|   1.0.5 | /usr/local/share/octave/packages/general-1.0.5
>        java *|   1.2.3 | /usr/local/share/octave/packages/java-1.2.3
>    jhandles  |   0.3.2 | /usr/local/share/octave/packages/jhandles-0.3.2
>
> this means, that I can not recall any of the jhandles function.

Yes. JHandles package is not autoloaded. Either use the -autoload
switch when installing it, or simply type 'pkg load jhandles'.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@octave.org
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: Trouble installing Java and Jhandles

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/2/08, Khaled <kshawky@...> wrote:

>
>
> Hello again,
>
>   Thanks for your prompt answer :)
>
>  I tried "pkg load jhandles", Octave breaks when ever I call any plotting
> command. It also through this exception, :
>
> " octave: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
> panic: Aborted -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Aborted

Sorry, I have no idea. This seems related to X11, but I can't
really help further as I'm not using Linux.

I found this reference, which might help you:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave