problem in compiling

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

Moderators: 99jonathan, roger, imaqine

problem in compiling

Postby msim » Thu May 31, 2007 3:03 am

whenever I go to compile my basic program I get this message.

"'javac' is not recognized as an internal or external command,
operable program or batch file."

what should I do to fix this?
I am running eclipse BTW
msim
New User
 
Posts: 2
Joined: Thu May 31, 2007 12:51 am

Postby Hardrive » Thu May 31, 2007 7:23 pm

First off, you shouldn't be using javac, you should be using the lejos commands described in the README file (it's in the .zip file you downloaded).

However, you need to modify your path to where you installed java.
Hardrive
New User
 
Posts: 12
Joined: Fri May 25, 2007 9:13 pm

Postby imaqine » Fri Jun 01, 2007 2:39 pm

Hey msim,

Like, harddrive mentioned, take a look at the readme.txt and that should help out a bit. If you have a copy of the newly released book (or want to compile in eclipse anyway) take a look at the following link: http://lejos.sourceforge.net/forum/viewtopic.php?t=167&highlight=eclipse. Hope the helps, feel free to ask anymore questions and welcome to the community!
imaqine
Moderator
 
Posts: 79
Joined: Sun Apr 08, 2007 6:20 am

NxJ Eclipse config help

Postby rudolphg » Mon Jun 25, 2007 8:22 pm

I am attempting to compile from Eclipse using External Tools.
I am using Eclipse 3.2 with JDK 1.6 on Winxp on a TabletPC.

When I use the compile option I have set up (which executes lejosjc.bat), I get the following error:

javac: -target requires an argument
Usage: javac <options> <source files>
use -help for a list of possible options

What have I configured incorrectly?
Note: I have seen posts about Eclipse configuration for Lejos hat currently seem to have disappeared or become unreachable.

BTW, I was able to compile, link, download and run via commandline.
rudolphg
New User
 
Posts: 9
Joined: Mon Jun 25, 2007 6:00 pm

Postby imaqine » Mon Jun 25, 2007 9:16 pm

Try this in eclipse:


Location (change to location of lejos install): c:\lejos_nxj\lejoslink.bat
Working dir: ${project_loc}
Arguments: -o ${java_type_name}.bin {java_type_name}

* Change .bin to .lej if that is what you use in lejosdl!

The thread that was linked up above appears to have disappeared. I have a cached version of it that I got off of google. You can try looking at it here :http://216.239.51.104/search?q=cache:E1SYmZlKSwcJ:lejos.sourceforge.net/forum/viewtopic.php%3Ft%3D167+site:http://lejos.sourceforge.net/forum/+maximum+lego+nxt&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a

I will try to get this page back up and running soon.
imaqine
Moderator
 
Posts: 79
Joined: Sun Apr 08, 2007 6:20 am

Postby rudolphg » Tue Jun 26, 2007 12:01 am

Thanks for the reply! That was the link I was looking for.
However, I was one step prior to linking-trying to get the
compile to work, which I finally did. But I also recognized
the source of my particular problems (pun intended, I suppose):

I have Eclipse set up to separate the code into src and bin
directories. So when I set parameters for the external tools,
lejosjc couldn't find my source file, because it's one directory below
${project_loc} in the src directory.
If I change the External Tool "arguments" field to

Code: Select all
src\${java_type_name}.java -d bin


for lejosjc, it finds the source in src, but puts class files in bin,
where I want them.

Then, of course, I have to change the settings for lejoslink and lejosdl
External Tools to look in the project's bin directory for files, and
everything should work just fine.

I realize that with examples we try to keep things simple--so you
wouldn't tell people to separate source and binary files that way.
I'm just elaborating on this because I got caught by it, and other
people might be interested.
rudolphg
New User
 
Posts: 9
Joined: Mon Jun 25, 2007 6:00 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff