Help needed for Mac OS X install

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

Help needed for Mac OS X install

Postby walts » Tue Aug 18, 2009 9:23 pm

I've been following the "First Brick" tutorial and everything has been going as expected except for running firmdl. when I do it here is what I get:
Code: Select all
TestComputer:bin walts$ ./firmdl
read firmware srec
  100%
Installing firmware
Loading native libs
Unable to load native libraries: no jirtrcx in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: close
   at josx.rcxcomm.Tower.close(Native Method)
   at josx.rcxcomm.Tower.closeTower(Tower.java:53)
   at js.tools.Download.close(Download.java:88)
   at js.tools.FirmdlTool.start(FirmdlTool.java:124)
   at js.tools.FirmdlTool.start(FirmdlTool.java:46)
   at js.tools.Firmdl.start(Firmdl.java:75)
   at js.tools.Firmdl.main(Firmdl.java:35)
TestComputer:bin walts$


I dont find anything relating to "java.library.path" in my environment. I also had trouble finding the SDK bin directory for step 2. After much searching I came up with
Code: Select all
/Library/Frameworks/JavaFX.framework/Versions/1.2/bin


The Mindstorms software is installed and communicates with the RCX so I'm assuming the hardware setup is OK.

I'm out of ideas here, can anyone help?

Walt
walts
New User
 
Posts: 1
Joined: Tue Aug 18, 2009 8:11 pm

Postby helifreak » Wed Nov 18, 2009 5:55 pm

Well, I can't help much - I too have an RCX that I would like to get up and running under OS X.

Any help would be much appreciated.

I am actually one step behind in that I don't even have the Mindstorms RIS2.0 software installed. Is this required for communication with the USB IR receiver??
helifreak
New User
 
Posts: 9
Joined: Mon Nov 16, 2009 6:40 pm

Postby helifreak » Thu Nov 19, 2009 5:01 am

I've given up with Lejos for my RCX on Mac OS 10.6. Given that the JDK is now up to Java 1.6, getting something to run that was originally built for Java 1.3 to work is probably futile.

Java, although intended for write once, run everywhere, never truly fulfilled its promises.

I have Lejos working perfectly for my NXT - but this doesn't help much for my RCX - I do have NQC/NXC working perfectly for both...

Not that anyone is even looking at this thread, but this is the error I get when trying to run "firmdl":

Exception in thread "main" java.lang.NoClassDefFoundError: js/tools/Firmdl
Caused by: java.lang.ClassNotFoundException: js.tools.Firmdl
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:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
helifreak
New User
 
Posts: 9
Joined: Mon Nov 16, 2009 6:40 pm

Postby petegas » Tue Dec 01, 2009 4:12 pm

I just dug out my old RCX and will try this soon! Note your exception means it cannot find the js.tools.Firmdl class on your classpath, double check that your Java environment is set up correctly to see the Firmdl class

helifreak wrote:I've given up with Lejos for my RCX on Mac OS 10.6. Given that the JDK is now up to Java 1.6, getting something to run that was originally built for Java 1.3 to work is probably futile.

Java, although intended for write once, run everywhere, never truly fulfilled its promises.

I have Lejos working perfectly for my NXT - but this doesn't help much for my RCX - I do have NQC/NXC working perfectly for both...

Not that anyone is even looking at this thread, but this is the error I get when trying to run "firmdl":

Exception in thread "main" java.lang.NoClassDefFoundError: js/tools/Firmdl
Caused by: java.lang.ClassNotFoundException: js.tools.Firmdl
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:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
petegas
New User
 
Posts: 1
Joined: Tue Dec 01, 2009 4:09 pm

Postby tsinn » Wed Feb 17, 2010 11:20 pm

Regarding the library issue:

You need to set LD_LIBRARY_PATH. I also had to set DYLD_LIBRARY_PATH to $LEJOS_HOME/bin

I'm running:
OS X 10.5.8 with java 1.5
I compiled it against both MacOSX10.4u.sdk & MacOSX10.5.sdk
The compiled code works on 10.4 and a friends laptop that's running 10.5 w/ out developer tools.

I'm a teacher (high/upper school) and I use the RCX 3.0 code on OS X using the terminal and vi
I made an installer using Apple's PackageMaker.

You just double click on the installer and it sets everything up.
You should then be able to run everything from the terminal fine.
(Note: I only need firmdl, lejosjc and lejos so that's what it sets up.)

The installer will:
puts the Lejos folder in /Applications/lejos
creates sym. links in /usr/bin for lejosjc, firmdl, and lejos

I modified lejosjc, firmdl and lejos so you don't need to set any env. vars.

Feel free to give it a try:
http://sites.google.com/site/sinnottpro ... ects=0&d=1

I hope it works for you. Let me know if you have issues. Any comments will help make the install easier for my students

(BTW: I do NOT have the Mindstorms software installed)
tsinn
New User
 
Posts: 4
Joined: Fri Jan 22, 2010 2:55 am

Postby minimammut » Mon May 10, 2010 11:26 am

I tried it on Snow-Leopard and unfortunately it doesnt work...
seems like I have to compile on my own...

This would we really great if it worked!
Thanks for the effort!

Code: Select all
oliver$ firmdl
using firmware [/Applications/lejos/current/bin/lejos.srec]
read firmware srec
  100%
Installing firmware
Loading native libs
Unable to load native libraries: /Applications/lejos/lejos3/bin/libjirtrcx.jnilib:  no suitable image found.  Did find:  /Applications/lejos/current/bin/libjirtrcx.jnilib: mach-o, but wrong architecture  /Applications/lejos/lejos3/bin/libjirtrcx.jnilib: mach-o, but wrong architecture
Exception in thread "main" java.lang.UnsatisfiedLinkError: josx.rcxcomm.Tower.close()I
   at josx.rcxcomm.Tower.close(Native Method)
   at josx.rcxcomm.Tower.closeTower(Tower.java:53)
   at js.tools.Download.close(Download.java:88)
   at js.tools.FirmdlTool.start(FirmdlTool.java:124)
   at js.tools.FirmdlTool.start(FirmdlTool.java:62)
   at js.tools.Firmdl.start(Firmdl.java:81)
   at js.tools.Firmdl.main(Firmdl.java:35)
minimammut
New User
 
Posts: 2
Joined: Sat Jan 05, 2008 11:33 am

Re: Help needed for Mac OS X install

Postby kruunch » Thu Aug 04, 2011 4:06 pm

Here's what could be done in Snow Leopard to fix the 'wrong architecture' issue. http://mike.crute.org/blog/java-woes-on ... opard-10-6

However, now that I'm using Lion, I went into Java Preferences (under Applications) and edited the order so that 32-bit comes first. After doing that, I did not get the error message again!
kruunch
New User
 
Posts: 1
Joined: Thu Aug 04, 2011 4:04 pm

Re:

Postby maccast » Fri Nov 11, 2011 11:54 pm

tsinn wrote:Regarding the library issue:

I made an installer using Apple's PackageMaker.

...

Feel free to give it a try:
http://sites.google.com/site/sinnottpro ... ects=0&d=1

I hope it works for you.

(BTW: I do NOT have the Mindstorms software installed)


I just tried this on my Mac running the very latest build of OS X Lion 10.7.2 and a USB Tower and it works perfectly. Thank you. I tried installing the build myself, but could;t get it to successfully compile so this is a real help. You have revived my aging RCX 1.0 and I can now play with my original Mindstorms again. This is awesome! :D
maccast
New User
 
Posts: 5
Joined: Fri Nov 11, 2011 11:49 pm

Re: Help needed for Mac OS X install

Postby maccast » Sat Nov 12, 2011 12:45 am

I forgot to mention that you need to ensure that Java is installed in 10.7 and that you change the preferred order in Applications/Utilities/Java Preferences to make sure it uses Java SE 6 (32-bit) first. Otherwise you will see this error when trying to load your program:

Code: Select all
Unable to load native libraries: /Applications/lejos/lejos3/bin/libjirtrcx.jnilib:  no suitable image found.  Did find:  /Applications/lejos/current/bin/libjirtrcx.jnilib: mach-o, but wrong architecture  /Applications/lejos/lejos3/bin/libjirtrcx.jnilib: mach-o, but wrong architecture
Exception in thread "main" java.lang.UnsatisfiedLinkError: josx.rcxcomm.Tower.close()I
maccast
New User
 
Posts: 5
Joined: Fri Nov 11, 2011 11:49 pm

Re: Help needed for Mac OS X install

Postby alexbbrown » Fri Jun 29, 2012 3:33 am

tsinn's package seems to be working for me with a USB tower and RCX1.0 bricks on OSX Lion!

I have downloaded and run the DistributionSmokeTest as suggested in the beginners tutorial in the (downloadable) documentation for lejos 3.0. (download here http://lejos.sourceforge.net/rcx-downloads.php)

Thanks!
alexbbrown
New User
 
Posts: 1
Joined: Fri Jun 29, 2012 3:23 am

Re: Help needed for Mac OS X install

Postby joostbakker » Wed Nov 21, 2012 7:16 pm

Hi,

I want to revive my RCX 1.0. I have used NQC in the past, but I see that it is not possible to use that on Intel Macs. For using LeJos I need to upgrade my knowledge significantly. Before going all the way, the following question. Will it work under Mountain Lion? I have seen a post that it works with OSX Lion.

Thanks for letting me know.

Joost
joostbakker
New User
 
Posts: 1
Joined: Wed Nov 21, 2012 7:01 pm

Re: Help needed for Mac OS X install

Postby ninjaben » Fri Feb 01, 2013 4:39 am

This was helpful for me! Thanks for the installer package and the tips.

I had to jump one additional hurdle. As of October 2012, Apple removed the Java Preferences application from OS X 10.7: http://support.apple.com/kb/ht5493.

This makes it harder to choose the 32-bit JMV over the default 64-bit JVM. But you can still do it. I did it by adding the "-d32" flag to the lejos scripts that invoke java.

I opened /Applications/lejos/lejos3/bin/firmdl with a text editor, and found a line near the bottom that starts like this:
Code: Select all
java -Djava.library.path="$LEJOS_HOME/bin" ...

I just insterted the "-d32" flag:
Code: Select all
java -d32 -Djava.library.path="$LEJOS_HOME/bin" ...


This allowed me to download the firmware to my RCX brick. Hooray! It had been years.

I did likewise with /Applications/lejos/lejos3/bin/lejos. I found a line that starts like this:
Code: Select all
java -classpath "$LINK_CLASSPATH" ...

and inserted "-d32" like so:
Code: Select all
java -d32 -classpath "$LINK_CLASSPATH" ...


This allowed me to download the SimpleSample example from the lejos tutorial. The program worked. Sweet. I'm excited to use my RCX bricks again!

Perhaps there will be other scripts in the /Applications/lejos/lejos3/bin/ folder that want editing. Should be just as easy to insert the "-d32".

For reference, I'm using tsinn's installer package, OS X 10.7.5, the USB IR tower, and RCX 1.0 and 2.0 bricks.

Ben
ninjaben
New User
 
Posts: 1
Joined: Fri Feb 01, 2013 4:06 am


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff