|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
java and linuxHello,
I'm trying to install jhandles on a SLED 10 linux distribution. I've learned that I need the java package first. When I try to install that one, I get the complaint that the Java Source Development Kit is not found, and it does not install. I've done a forced upgrade of the octave package, to no avail. Any other ideas? John. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxThe Java Source Development Kit (SDK) is part of Sun Java. You should be able to get it from either Sun, or the openSuSE site or one of the rpm mirrors. On Mon, 30 Jun 2008, Janmaat, John wrote: > Hello, > > I'm trying to install jhandles on a SLED 10 linux distribution. I've > learned that I need the java package first. When I try to install that > one, I get the complaint that the Java Source Development Kit is not > found, and it does not install. > > I've done a forced upgrade of the octave package, to no avail. > > Any other ideas? > > John. > _______________________________________________ > Help-octave mailing list > Help-octave@... > https://www.cae.wisc.edu/mailman/listinfo/help-octave > Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Tue, Jul 1, 2008 at 1:51 AM, Bob Odom <odom@...> wrote:
> > The Java Source Development Kit (SDK) is part of Sun Java. You should be > able to get it from either Sun, or the openSuSE site or one of the rpm > mirrors. You'll need JDK >= 1.6 to compile the java package. Moreover, JHandles also requires JOGL. Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxHello,
Thanks for the reply. The SDK is installed on the machine. However, when I try to install the java package with Octave, it reports that it thinks it is not installed. I have 2.9.12-66 installed on a SUSE SLED 10 machine. Any other suggestions? John. On Mon, 2008-06-30 at 16:51 -0700, Bob Odom wrote: > The Java Source Development Kit (SDK) is part of Sun Java. You should be > able to get it from either Sun, or the openSuSE site or one of the rpm > mirrors. > > > On Mon, 30 Jun 2008, Janmaat, John wrote: > > > Hello, > > > > I'm trying to install jhandles on a SLED 10 linux distribution. I've > > learned that I need the java package first. When I try to install that > > one, I get the complaint that the Java Source Development Kit is not > > found, and it does not install. > > > > I've done a forced upgrade of the octave package, to no avail. > > > > Any other ideas? > > > > John. > > _______________________________________________ > > Help-octave mailing list > > Help-octave@... > > https://www.cae.wisc.edu/mailman/listinfo/help-octave > > Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Tue, Jul 1, 2008 at 8:34 PM, Janmaat, John <john.janmaat@...> wrote:
> Hello, > > Thanks for the reply. The SDK is installed on the machine. However, > when I try to install the java package with Octave, it reports that it > thinks it is not installed. I have 2.9.12-66 installed on a SUSE SLED > 10 machine. > > Any other suggestions? Where is libjvm.so installed? According to this location, you should define JAVA_HOME. For instance, if libjvm.so is located in /usr/lib/jvm/jre/lib/i386/client/libjvm.so, the define JAVA_HOME to /usr/lib/jvm. Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxHello Michael,
No go. My JAVA_HOME points to /usr/lib/jvm/jre, from where the file you mention is located. It is a directory deeper. Thought maybe that it couldn't find javac, which is in a branch of the /usr/lib/jvm directory, not the ../jre directory. Changed that, but still doesn't work. John. On Tue, 2008-07-01 at 20:58 +0200, Michael Goffioul wrote: > On Tue, Jul 1, 2008 at 8:34 PM, Janmaat, John <john.janmaat@...> wrote: > > Hello, > > > > Thanks for the reply. The SDK is installed on the machine. However, > > when I try to install the java package with Octave, it reports that it > > thinks it is not installed. I have 2.9.12-66 installed on a SUSE SLED > > 10 machine. > > > > Any other suggestions? > > Where is libjvm.so installed? According to this location, you should > define JAVA_HOME. For instance, if libjvm.so is located in > /usr/lib/jvm/jre/lib/i386/client/libjvm.so, the define JAVA_HOME > to /usr/lib/jvm. > > Michael. Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxI'm glad to see this post. I too would like to run Jhandles on Linux but have not had much luck. I have compiled and installed the package but it doesn't work and perhaps others on the list will be able to help figure out why. First, I read somewhere on Nabble that JOGL must be built from the source using java version 1.6 or less.
With this in mind here iis the background on my system and how I built the code. First, I am running fedora 8, octave version 3.0.0, octave java 1.2.2 and jhandles 0.3.3 . Java 1.2.2 was included with octave-forge which I installed using yum instead of the package manager (The package manager doesn't seem to work on my machine). I started by first downloading “jdk1.6.0_06” from sun. I placed this in my home directory, subdirectory apps ( you can place it anywhere). I set the environmental variable JAVA_HOME as follows: export JAVA_HOME=/home/scott/apps/jdk1.6.0_06/ I downloaded both gluegen and jogl from the following link: http://download.java.net/media/jogl/builds/nightly/jogl-1.1.2-pre-20080523-src.zip I unziped and detar'ed this file in the apps directory which yielded two folders : /home/scott/apps/gluegen /home/scott/apps/jogl I cd'ed into the gluegen folder, subfolder “make” . In this folder are two files , build.xml and gluegen.properties. I first opened up gluegen.properties and uncommented line 13 (ie antlr.jar linux path, I set this path to : /usr/share/java/antlr.jar) . I have two versions of Java on my computer so I wanted to make sure I was using version 1.6 for the build so I scanned down the build.xml file to determine where this was set. At about line 176 it appears that the JAVA_HOME environmental variable is used to determine which version of java to use. I next used “ant” to build gluegen (ie at the prompt I typed “ant”). After a successful build of gluegen the following jar files were made in the gluegen/build folder: antlr.jar gluegen-rt.jar gluegen.jar gluegen-rt-natives-linux-i586.jar I next cd'ed back to the apps/jogl folder, subfolder “make”. I opened up build.xml and added the following three lines right after line 51 which has “<project name="JOGL" basedir="." default="all">” appearing on it. <property name="user.home" value="/home/scott/apps/jogl" /> <property name="gluegen.root" value="/home/scott/apps/gluegen" /> <property name="java.home.dir" value="/home/scott/apps/jdk1.6.0_06/" /> I had to make additional changes latter on in the build.xml script, specifically to the “syslibset” tag but I think that's a Fedora thing which you shouldn't need to worry about. Again I saved my changes to build, typed ant at the command prompt which yielded : jogj.jar in the jogl/build directory. Next I downloaded and unzipped both java-1.2.2 and jhandles-0.3.3 to the apps folder. I didn't bother to rebuild java-1.2.2 but as you will see “__java__.h” is required for the build and this file is not included in octave forge. I cd'ed into apps/jhandles-0.3.3/src folder and ran ./configure which made the file “Makeconf ”. I edited this file to include the correct paths, ie... on my machine they were JAVAC = javac JAR = jar JAVA_HOME = /home/scott/apps/jdk1.6.0_06 JAVA_ARCH = i386 JAVA_LIBS = JAVA_INCS = -I/home/scott/apps/jdk1.6.0_06/include -I/home/scott/apps/jdk1.6.0_06/include/linux HAVE_JAVA = yes JOGL_JAR = /home/scott/apps/jogl/build/jogl.jar OCTAVE_JAR = /home/scott/apps/java-1.2.2/octave.jar OCTAVE_JAVA_DIR = /home/scott/apps/java-1.2.2 OCTAVE_JAVAOCT_DIR = OCTAVE_PATHSEP = : I then copied “__java__.h” from java-1.2.2/src/ to jhandles-0.3.3/src/. I made no changes to the “makefile” file aside from adding a verbose option under “%.jar”. This is not required for the build but it was helpful as I was able to determine that the classpath flag “-cp” does not work (which is weird). Because of this I placed symbolic links to all the gluegen and jogj jar files in the /home/scott/apps/jdk1.6.0_06/jre/lib/ext/ folder. I then typed “make all” from within handles-0.3.3/src/ which yielded jhandles.jar ,__jhandles__.oct and libgl2ps_java.so. At this point I opened up my octaverc file and added the following lines which are primarily from the PKG_ADD script. putenv('JAVA_HOME','/home/scott/apps/jdk1.6.0_06/'); putenv('LD_LIBRARY_PATH',['/home/scott/apps/gluegen/build:', ... '/home/scott/apps/jogl/build:']); addpath('/home/scott/apps/jhandles-0.3.3/inst') javaaddpath('/home/scott/apps/jhandles-0.3.3/inst/jhandles.jar'); javaaddpath('/home/scott/apps/jogl/build/jogl.jar'); javaaddpath('/home/scott/apps/gluegen/build/antlr.jar'); javaaddpath('/home/scott/apps/gluegen/build/gluegen-rt.jar'); javaaddpath('/home/scott/apps/gluegen/build/gluegen.jar'); dispatch ("get", "__jhandles_get", "any"); dispatch ("set", "__jhandles_set", "any"); dispatch ("ishandle", "__jhandles_ishandle", "any"); dispatch ("__go_figure__", "__jhandles_go_figure", "any"); dispatch ("__go_delete__", "__jhandles_go_delete", "any"); dispatch ("__go_axes__", "__jhandles_go_axes", "any"); dispatch ("__go_axes_init__", "__jhandles_go_axes_init", "any"); dispatch ("__go_text__", "__jhandles_go_text", "any"); dispatch ("__go_surface__", "__jhandles_go_surface", "any"); dispatch ("__go_image__", "__jhandles_go_image", "any"); dispatch ("__go_patch__", "__jhandles_go_patch", "any"); dispatch ("__go_line__", "__jhandles_go_line", "any"); atexit ("__jhandles_exit"); mark_as_command shading; mark_as_command legend; mark_as_command hidden; mark_as_command colorbar; java_invoke ("java.lang.System", "setProperty", "octave.jhandles.path", ... fileparts (mfilename ("fullpath"))); I then opened up octave and typed “figure” which yielded the following error: error: [java] java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path error: evaluating if command near line 25, column 3 error: called from `__jhandles_go_figure' in file `/home/scott/apps/jhandles-0.3.3/inst/__jhandles_go_figure.m' error: evaluating assignment expression near line 67, column 9 error: evaluating if command near line 66, column 5 error: evaluating if command near line 65, column 3 error: called from `figure' in file `/usr/share/octave/3.0.0/m/plot/figure.m' This tells me that the gluegen-rt.jar file can't be found despite the symbolic link being present in the /home/scott/apps/jdk1.6.0_06/jre/lib/ext/ folder. The weird thing is next time I type “figure” the error message changes to : error: [java] java.lang.NoClassDefFoundError: Could not initialize class com.sun.opengl.impl.x11.X11GLDrawableFactory error: evaluating if command near line 25, column 3 error: called from `__jhandles_go_figure' in file `/home/scott/apps/jhandles-0.3.3/inst/__jhandles_go_figure.m' error: evaluating assignment expression near line 67, column 9 error: evaluating if command near line 66, column 5 error: evaluating if command near line 65, column 3 error: called from `figure' in file `/usr/share/octave/3.0.0/m/plot/figure.m' Which just says that jogl is screwed up. Anyway, I'm not certain how helpful this will be given I haven't been able to make jhandles work on my system but perhaps someone else will have some idea where I have gone wrong. Good Luck!
|
|
|
Re: java and linuxOn Tue, Jul 1, 2008 at 9:10 PM, Janmaat, John <john.janmaat@...> wrote:
> Hello Michael, > > No go. My JAVA_HOME points to /usr/lib/jvm/jre, from where the file you > mention is located. It is a directory deeper. Thought maybe that it > couldn't find javac, which is in a branch of the /usr/lib/jvm directory, > not the ../jre directory. Changed that, but still doesn't work. There are 2 things you should take care of: 1) all java binaries should be in your PATH (java, javac, jar...) 2) if JVM is not installed in a directory like: /usr/lib/jvm/jre/lib/$ARCH/client/libjvm.so then JAVA_HOME should be defined such that JVM is located in $JAVA_HOME/jre/lib/$ARCH/client/libjvm.so If it still does not work, could you report what you get when the configure script of the java package is executed? Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Wed, Jul 2, 2008 at 7:02 AM, Scott Haynes <scotth20@...> wrote:
> With this in mind here iis the background on my system and how I built the > code. First, I am running fedora 8, octave version 3.0.0, octave java > 1.2.2 and jhandles 0.3.3 . Java 1.2.2 was included with octave-forge which I > installed using yum instead of the package manager (The package manager > doesn't seem to work on my machine). Maybe it would be better to compile both java and jhandles with the same JDK. Make sure first that java package works fine: l = java_new('java.util.LinkedList') > JAVA_HOME = /home/scott/apps/jdk1.6.0_06 > > JAVA_ARCH = i386 This means that libjvm.so is located at /home/scott/apps/jdk1.6.0_06/jre/lib/i386/client/libjvm.so If this is not the case, then JAVA_HOME is wrongly defined. > error: [java] java.lang.UnsatisfiedLinkError: no gluegen-rt in > java.library.path [snip] > This tells me that the gluegen-rt.jar file can't be found despite the > symbolic link being present in the /home/scott/apps/jdk1.6.0_06/jre/lib/ext/ > folder. No, I think it tells you that it can't find the native libraries coming with JOGL. For instance under Windows, I have 4 DLL's: gluegen-rt.dll, jogl.dll, jogl_awt.dll and jogl_cg.dll. Those must be available for the dynamic linker (under Windows, this means in PATH). Under Linux, you have equivalent .so libraries (maybe not the 4th one) and they should be available from LD_LIBRARY_PATH Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Tue, Jul 01, 2008 at 11:34:35AM -0700, Janmaat, John wrote:
> Hello, > > Thanks for the reply. The SDK is installed on the machine. However, > when I try to install the java package with Octave, it reports that it > thinks it is not installed. I have 2.9.12-66 installed on a SUSE SLED > 10 machine. > > Any other suggestions? Maybe this help you: http://www.cae.wisc.edu/pipermail/help-octave/2008-May/009357.html Mirek _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxApplications From Scratch: http://appsfromscratch.berlios.de/ --- On Wed, 7/2/08, Miroslaw Kwasniak <mirek@...> wrote: > From: Miroslaw Kwasniak <mirek@...> > Subject: Re: java and linux > To: help-octave@... > Date: Wednesday, July 2, 2008, 1:17 AM > On Tue, Jul 01, 2008 at 11:34:35AM -0700, Janmaat, John > wrote: > > Hello, > > > > Thanks for the reply. The SDK is installed on the > machine. However, > > when I try to install the java package with Octave, it > reports that it > > thinks it is not installed. I have 2.9.12-66 > installed on a SUSE SLED > > 10 machine. > > > > Any other suggestions? > > Maybe this help you: > http://www.cae.wisc.edu/pipermail/help-octave/2008-May/009357.html > > Mirek > _______________________________________________ > Help-octave mailing list > Help-octave@... > https://www.cae.wisc.edu/mailman/listinfo/help-octave I think the fact that you had to change jhandles-0.3.3/src/Makefile means there is a bug. Have you written a message to the bugs list ? I could never build jhandles on Liniux, though I didn't dig. Other packages build nicely or do not build for obvious reasons. Thanks, Sergei. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Wed, Jul 02, 2008 at 07:46:28AM -0700, Sergei Steshenko wrote:
> I think the fact that you had to change jhandles-0.3.3/src/Makefile means > there is a bug. Yes, it is. > Have you written a message to the bugs list ? No, because this workaround was given by Michael Goffioul (jhandles maintainer): http://www.cae.wisc.edu/pipermail/help-octave/2008-February/008081.html :) _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxApplications From Scratch: http://appsfromscratch.berlios.de/ --- On Wed, 7/2/08, Miroslaw Kwasniak <mirek@...> wrote: > From: Miroslaw Kwasniak <mirek@...> > Subject: Re: java and linux > To: "Sergei Steshenko" <sergstesh@...> > Cc: help-octave@... > Date: Wednesday, July 2, 2008, 12:40 PM > On Wed, Jul 02, 2008 at 07:46:28AM -0700, Sergei Steshenko > wrote: > > I think the fact that you had to change > jhandles-0.3.3/src/Makefile means > > there is a bug. > > Yes, it is. > > > Have you written a message to the bugs list ? > > No, because this workaround was given by Michael Goffioul > (jhandles > maintainer): > > http://www.cae.wisc.edu/pipermail/help-octave/2008-February/008081.html > > :) Michael, has the issue been fixed in the released version of 'octave' packages ? Thanks, Sergei. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxOn Thu, Jul 3, 2008 at 4:08 AM, Sergei Steshenko <sergstesh@...> wrote:
>> No, because this workaround was given by Michael Goffioul >> (jhandles >> maintainer): >> >> http://www.cae.wisc.edu/pipermail/help-octave/2008-February/008081.html >> >> :) > > Michael, > > has the issue been fixed in the released version of 'octave' packages ? This problem should not happend anymore as __jhandles__.oct is normally not built. This is fixed on SVN, but the problem is still present in version 0.3.3 of the package. Michael. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: java and linuxMichael,
Thanks for the tips. I have made progress but have a new error. At the moment I still have not rebuilt java-1.2.2 but that is likely the next step. For starters I pasted the following at the octave prompt l = java_new('java.util.LinkedList') which yielded: l =<Java object: java.util.LinkedList> Java works fine and I also confirmed that my JAVA_HOME environmental variable is properly defined. It seems that the LD_LIBRARY_PATH was the imeadiate problem. > I have 4 DLL's: gluegen-rt.dll, > jogl.dll, jogl_awt.dll and jogl_cg.dll. Those must be available for the > dynamic linker (under Windows, this means in PATH). Under Linux, > you have equivalent .so libraries (maybe not the 4th one) and they > should be available from LD_LIBRARY_PATH After the build of gluegen and jogl the following libraries were created in the build/obj folders of jogl and gluegen: libgluegen-rt.so libjogl.so libjogl_awt.so libjogl_cg.so was not present as you expected. In my octaverc file I added the following lines : putenv('LD_LIBRARY_PATH',['/home/scott/apps/gluegen/build:', ... '/home/scott/apps/jogl/build:', ... '/home/scott/apps/gluegen/build/obj:', ... '/home/scott/apps/jogl/build/obj:']); putenv('JAVA_ARCH','i386'); I started up octave and typed "plot(0:10)". At this point a figure window came up but nothing was plotted. The toolbar was present in the upper left. The octave command window returned the following error: error: [java] javax.media.opengl.GLException: java.awt.image.RasterFormatException: IntegerComponentRasters must have ComponentSampleModel or SinglePixelPackedSampleModel error: evaluating if command near line 21, column 5 error: evaluating if command near line 19, column 3 error: called from `drawnow' in file `/home/scott/apps/jhandles-0.3.3/inst/drawnow.m' I'm not sure what this means but I'm ready to build java-1.2.2 if that will help. |
|
|
Re: java and linuxI build java-1.2.2 from source using jdk 1.6 and was able to make the package work. |
|
|
Re: java and linuxJust want to add that, if you are using the latest JDK from Sun (jdk1.7.0), the libjvm.so file is in the server directory, not the client directory (which doesn't even exist). This is at least the case for the amd64 distribution of the jdk. Having changed the code (in __java__.cc) to look at server instead of client, I have successfully installed the java package and it works like a charm!! Thanks to all for this package. eric |
| Free embeddable forum powered by Nabble | Forum Help |