Welcome! Log In Create A New Profile

Advanced

Getting java host software to run on Leopard

Posted by Anonymous User 
Anonymous User
Getting java host software to run on Leopard
January 08, 2009 09:18PM
Hi All,

I've been trying to get the host java software to run on leopard 10.5. I'm getting the follow stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException
Caused by: java.lang.ClassNotFoundException: gnu.io.PortInUseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

From searching through the forum, these same class not found exception was being thrown on windows when rxtx wasn't installed. I installed rxtx directly but this had no affect. I've also tried switching the system default java to 1.6 but seeing as the reprap script is setting java_home to 1.6 this was a blind alley.

I've found a few posts from 3 or 4 months ago saying that rxtx 64bit support was flaky and that mac wont be releasing a 1.6 32bit jvm. So is the java host software a deadend on mac? I'm going to have a shot at getting the build running over the weekend to see if I can get it to run that way at least.

All the best
Barry
Re: Getting java host software to run on Leopard
January 09, 2009 02:09AM
First question, are you using the latest version of the host code?

David
Anonymous User
Re: Getting java host software to run on Leopard
January 10, 2009 05:11PM
I'm using the latest release off sourceforge, not directly off the end. I'm going to attempt running ubuntu within vmware fusion to see if I can get that working.
Re: Getting java host software to run on Leopard
January 20, 2009 01:20PM
Same here on Intel iMac running OS X 10.4 (Tiger) Tried to run the Java Host with Java 1.5 and 1.6 (using Soylatte16) as well but both result in the same errormsg.

For the same, the Arduino host software works ok and, to my knowledge, is also Java based and uses the RXTX java class.

Tried various settings of the CLASSPATH and PATH but no sucess.
Knowing not so much about Java I have no clue how to compile the recent SVN version. Have Netbeans installed but am rather lost there.

_Details_
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-275)
Java HotSpot(TM) Client VM (build 1.5.0_16-132, mixed mode, sharing)
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException

java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed mode)
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException

_Script used_ (adjusted version of the reprap-host-my-tiger.sh
#!/bin/sh

## X11 window
export DISPLAY=':0.0'

export JAVA_HOME=/opt/local/soylatte16/soylatte16-i386-1.0.3
export PATH=$JAVA_HOME/bin:$PATH

##export CLASSPATH=":/Users/johan/Desktop/reprap-host-mac-20081218"

java -version

##java -verbose -jar reprap.jar > ~/Desktop/javaLog.txt
java -jar reprap.jar


_Console log from (successfull) Arduino session_
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7

Edited 1 time(s). Last edit at 01/20/2009 02:20PM by Johan van Oostrum.
Re: Getting java host software to run on Leopard [fixed for Tiger]
February 04, 2009 08:56AM
Got the Java Host running on OS X 10.4.11 (Tiger) by compiling the most recent source code with NetBeans 6.1

For details, see my RR blog here: [1m93.blogspot.com]

Regards,
Johan
Re: Getting java host software to run on Leopard
February 07, 2009 01:27PM
I had this problem also. I saw somewhere to remove the RxTx jar files in the system Java Extensions folder, and it seemed to help.
I have the reprap host gui for mac up, the console is spewing lots of (GUI related) exceptions, but its running.

to be clear of the steps I took, I have the reprap.jar running on OS X 10.5, and Java Udates from Apple which include Java SE 1.6. The reprap host folder includes a shell script that will direct Leopord to use the correct Java version.

I am using the recent rxtx-devel build from CVS, 1.2-8 to make the RXTXcomm.jar and and putting the RXTXcomm.jar in the /System/Library/Java/Extensions folder and librxtxSerial.jnilib in the folder where the reprap-host-mac .jar is running from.

Also installed the j3d, jogl, and jogl extensions as directed in the reprap mac software forums at [www.reprap.org]

ronald miloh alexander
a reprap devotee
noisebridge.net

blokkendoos Wrote:
-------------------------------------------------------
> Same here on Intel iMac running OS X 10.4 (Tiger)
> Tried to run the Java Host with Java 1.5 and 1.6
> (using Soylatte16) as well but both result in the
> same errormsg.
>
> For the same, the Arduino host software works ok
> and, to my knowledge, is also Java based and uses
> the RXTX java class.
>
> Tried various settings of the CLASSPATH and PATH
> but no sucess.
> Knowing not so much about Java I have no clue how
> to compile the recent SVN version. Have Netbeans
> installed but am rather lost there.
>
> _Details_
> java version "1.5.0_16"
> Java(TM) 2 Runtime Environment, Standard Edition
> (build 1.5.0_16-b06-275)
> Java HotSpot(TM) Client VM (build 1.5.0_16-132,
> mixed mode, sharing)
> Exception in thread "main"
> java.lang.NoClassDefFoundError:
> gnu/io/PortInUseException
>
> java version "1.6.0_03-p3"
> Java(TM) SE Runtime Environment (build
> 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
> Java HotSpot(TM) Server VM (build
> 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed
> mode)
> Exception in thread "main"
> java.lang.NoClassDefFoundError:
> gnu/io/PortInUseException
>
> _Script used_ (adjusted version of the
> reprap-host-my-tiger.sh
> #!/bin/sh
>
> ## X11 window
> export DISPLAY=':0.0'
>
> export
> JAVA_HOME=/opt/local/soylatte16/soylatte16-i386-1.
> 0.3
> export PATH=$JAVA_HOME/bin:$PATH
>
> ##export
> CLASSPATH=":/Users/johan/Desktop/reprap-host-mac-2
> 0081218"
>
> java -version
>
> ##java -verbose -jar reprap.jar >
> ~/Desktop/javaLog.txt
> java -jar reprap.jar
>
>
> _Console log from (successfull) Arduino session_
> Experimental: JNI_OnLoad called.
> Stable Library
> =========================================
> Native lib Version = RXTX-2.1-7
> Java lib Version = RXTX-2.1-7
Sorry, only registered users may post in this forum.

Click here to login