HELP!! CANT PUSH FILES TO NXT

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

Moderators: roger, 99jonathan, imaqine

HELP!! CANT PUSH FILES TO NXT

Postby vishnuu09 » Tue May 29, 2012 3:54 am

Hey everyone.
Today I was just running thru the tutorials at lejos website and was trying the motors out. When I tried to run the program i get this message in Eclipse

Linking ...
js.tinyvm.TinyVMException: Method java.lang.System.exit is an unknown native method. You are probably using JDK APIs or libraries that cannot be run under leJOS.
at js.tinyvm.MethodRecord.<init>(MethodRecord.java:80)
at js.tinyvm.ClassRecord.storeMethods(ClassRecord.java:673)
at js.tinyvm.Binary.processMethods(Binary.java:653)
at js.tinyvm.Binary.createFromClosureOf(Binary.java:313)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:97)
at js.tinyvm.TinyVMTool.link(TinyVMTool.java:48)
at lejos.pc.tools.NXJLink.start(NXJLink.java:134)
at lejos.pc.tools.NXJLink.run(NXJLink.java:101)
at lejos.pc.tools.NXJLink.start(NXJLink.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at lejos.pc.tools.ToolStarter.startTool(ToolStarter.java:31)
at lejos.pc.tools.NXJLink.main(NXJLink.java:28)
Linking the file failed with exit status 1


WHATS THE PROBLEM? This is the 2nd day of using LejOS and yesterday everything worked fine. Why is it throwing this error? I tried reflashing lejos on the brick , but no to no use.
vishnuu09
New User
 
Posts: 5
Joined: Mon May 28, 2012 2:34 pm

Re: HELP!! CANT PUSH FILES TO NXT

Postby skoehler » Tue May 29, 2012 9:57 am

You classes.jar is incompatible with the linker you're using.
Did you copy an old version of classes.jar to your project and now you're trying to link it with a new leJOS?
skoehler
leJOS Team Member
 
Posts: 1114
Joined: Thu Oct 30, 2008 4:54 pm

Re: HELP!! CANT PUSH FILES TO NXT

Postby vishnuu09 » Wed May 30, 2012 4:50 am

Yes I did. I was looking at some source code from a Tic-Tac-Toe robot. He asked to copy this classes.jar file and replace the older one. Turns out HIS is the older one. How do i redownload the latest classes.jar? And thanks so much!
vishnuu09
New User
 
Posts: 5
Joined: Mon May 28, 2012 2:34 pm

Re: HELP!! CANT PUSH FILES TO NXT

Postby skoehler » Wed May 30, 2012 7:58 am

classes.jar is included with leJOS. Look into the lib/nxt folder of leJOS.
Also, don't copy classes.jar to the project. Use the leJOS plug-in for Eclipse, which takes care of adding the classes.jar that ships with leJOS to the build path of the project without copying it. Take a look at the leJOS tutorial on how to use the plug-in:
http://lejos.sourceforge.net/nxt/nxj/tu ... clipse.htm

You will most likely have to create a new leJOS NXT project, then copy the sources over from the old project.
skoehler
leJOS Team Member
 
Posts: 1114
Joined: Thu Oct 30, 2008 4:54 pm

Re: HELP!! CANT PUSH FILES TO NXT

Postby vishnuu09 » Wed May 30, 2012 9:27 am

Actually, I already have the plugins setup with eclipse. I downloaded a different classes.jar from some website and replaced it with the REAL classes.jar in lib/nxt folder. So my question is how do I redownload the originial classes.jar to paste in lib folder?
vishnuu09
New User
 
Posts: 5
Joined: Mon May 28, 2012 2:34 pm

Re: HELP!! CANT PUSH FILES TO NXT

Postby skoehler » Wed May 30, 2012 9:33 am

Use the plug-in to create another leJOS NXT Project. You will see, that there is an entry called "LeJOS NXT Runtime". It contains the reference to the classes.jar. If you deleted that entry from the build path of your project, it can be recreated by editing the build path of your project. Right click on the project, chose BuildPath>ConfigureBuildPath in the menu. In the Libraries tab, click the AddLibrary Button. Then chose leJOS Library Container, click next, then select NXT Runtime, and click Finish.
skoehler
leJOS Team Member
 
Posts: 1114
Joined: Thu Oct 30, 2008 4:54 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff