cannot import 3d libraries

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

Moderators: 99jonathan, roger, imaqine

cannot import 3d libraries

Postby Doug Fane » Thu Mar 08, 2012 12:52 pm

I use the jpct library for 3d work, and want to incorporate it into a current lejos project. My issue is that the PC program I wrote to interact with the NXT will not work when run through the standard java compiler/interpreter, but must be run through nxjpcc and nxjpc. This works fine until I try to import the 3d classes, at which point the nxjpcc compiler gives an error message saying it could not import the package. The libraries include fine when used in other programs and compiled by the standard java compiler, but nxjpcc does not recognize them.
Doug Fane
New User
 
Posts: 9
Joined: Sun Dec 04, 2011 11:20 pm

Re: cannot import 3d libraries

Postby skoehler » Thu Mar 08, 2012 12:55 pm

I strongly recommend to use Eclipse. http://lejos.sourceforge.net/nxt/nxj/tu ... clipse.htm
Adding the jpct libraries should be much easier with Eclipse.

Also, nxjpcc supports the standard javac parameters for adding libraries to the classpath:
nxjpcc -cp /path/to/jpcts/files/1.jar:/path/to/jpcts/files/2.jar
will do the trick. On windows, you need to replace : by ;
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: cannot import 3d libraries

Postby Doug Fane » Sat Mar 10, 2012 12:39 am

Thank you for the advice. I am using JCreator, so that may be part of the issue. I ended up finding a workaround, I used a temporary file to send the data from the NXT communications class to the 3d simulator. I appreciate the help though. I will post the code for the whole project to the projects section when I get the time to clean it up.
Doug Fane
New User
 
Posts: 9
Joined: Sun Dec 04, 2011 11:20 pm


Return to NXJ Software

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests

more stuff