help with lejosjc

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

Moderators: 99jonathan, roger, imaqine

help with lejosjc

Postby shortstop » Thu Dec 27, 2007 1:45 am

Code: Select all
C:\Documents and Settings\***\Desktop\lejos\lejos_nxj\samples\Tune>lejosjc Tun
e.java
javac: invalid flag: and
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are us
ed
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options


C:\Documents and Settings\***\Desktop\lejos\lejos_nxj\samples\Tune>


javac: invalid flag: and
???
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 2:48 am

I believe the "and" in the error message is the "and" in the path "c:\Documents and Settings\...".

Try to move/install the lejos stuff into a folder where the path into it has no spaces. e.g.: C:\java\lejos

Or, you could edit the BAT files and figure out what to enclose in double quotes.

Probably easier to just move the lejos stuff..
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 2:58 am

kirkpthompson wrote:I believe the "and" in the error message is the "and" in the path "c:\Documents and Settings\...".

Try to move/install the lejos stuff into a folder where the path into it has no spaces. e.g.: C:\java\lejos

Or, you could edit the BAT files and figure out what to enclose in double quotes.

Probably easier to just move the lejos stuff..


Ok, but now what other paths do I have to change?

If you can remember them off the top of your head that would be so helpful.


C:\lejos_nxj\samples\Tune>lejosjc Tune.java
'lejosjc' is not recognized as an internal or external command,
operable program or batch file.



Now I get this error.
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 3:41 am

I am assuming that you moved your lejos install.

Make sure to update your PATH envvar as well... I suggest you Follow the install instructions from the begining.

From the README.HTML:
Set the environment variable NXJ_HOME to the full path of the lejos_nxj directory.
Add the lejos_nxj/bin directory to your PATH.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 3:46 am

kirkpthompson wrote:I am assuming that you moved your lejos install.

Make sure to update your PATH envvar as well... I suggest you Follow the install instructions from the begining.

From the README.HTML:
Set the environment variable NXJ_HOME to the full path of the lejos_nxj directory.
Add the lejos_nxj/bin directory to your PATH.


Copied from lejosjc batch file:
:CHANGE
SET NXJ_HOME=%LEJOS_HOME%

Variable name: LEJOS_HOME
Variable value: C:\lejos_nxj

Variable name: Path
Variable value: ...;%LEJOS_HOME%\bin

Isn't that the only 2 variables i need?

Should I just ditch the stupid fucking book and do the README installer?
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 4:04 am

Your patience is lacking.

Check your %#$! PATH environment variable.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby kirkpthompson » Thu Dec 27, 2007 4:10 am

and read, understand, and follow the information in viewtopic.php?t=232.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 4:12 am

I checked my god damn PATH variable.
%NXJ_HOME%\bin;C:\j2sdk1.4.2_13\bin

K, that seems to work, javac works 100%, but if I do lejosjc or nxjc I get:
javac: invalid flag: Files\Java\jre1.6.0_02\lib\ext\QTJava.zip

I unzipped QTJava to that directory, error persists.
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 4:31 am

if you are getting
'lejosjc' is not recognized as an internal or external command,
operable program or batch file.
that is indicative of not having your PATH set to where lejosjc.bat is located.

type PATH at a cmd prompt to see if it expands correctly and includes the path to your NXJ_HOME/bin
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby kirkpthompson » Thu Dec 27, 2007 4:39 am

Check your CLASSPATH envvar. As an example, here is mine:
Code: Select all
CLASSPATH=.;C:\java\icommand-0.6\dist\icommand.jar;C:\java\icommand-0.6\dist\bluecove.jar;C:\java\lejos_nxj\lib\classes.jar;C:\java\RXTX\RXTXcomm.jar;C:\java\mywork\LejosNXJ\lejos\classes\lejos
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 5:05 am

-It says nothing in the install README about CLASSPATH

-What should I put in classpath? So far it has C:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip (which I recognize from C:\lejos_nxj\samples\Tune>lejosjc Tune.java
javac: invalid flag: Files\Java\jre1.6.0_02\lib\ext\QTJava.zip)

Should I only add C:\lejos_nxj\lib\classes.jar?
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 5:36 am

I don't know what QTJava.zip is for or why you are referencing it. I recommend you use the readme.html to set up lejos.

FYI, CLASSPATH info is at http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html

I may have led you down a primrose path so starting over may be the best option. especially if you have modified BAT files without understanding what you are doing.

Good luck.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 6:21 am

I DID start over using the README.html.

QTJava.zip was in my CLASSPATH before I even started this, and it was the only thing there.

I still don't know what to put in CLASSPATH...
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Postby kirkpthompson » Thu Dec 27, 2007 6:49 am

It appears the space in the "Program Files" part of the path to QTJava.zip in the CLASSPATH is messing with the lejos batch files. Lejos batch files do not like spaces in any path.

Try this in the cmd window session you have opened to do the "lejosjc Tune.java" command:
Code: Select all
set CLASSPATH=

this will "erase" the CLASSPATH envvar for the life of that cmd session. Then try the lejosjc.bat command again.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby shortstop » Thu Dec 27, 2007 7:22 am

Thanks so much for your help.

Error: Class Tune.java (file Tune/java.class) not found in CLASSPATH .;C:\lejos_
nxj\3rdparty\lib\bcel-5.1.jar;C:\lejos_nxj\3rdparty\lib\commons-cli-1.0.jar;C:\l
ejos_nxj\lib\pctools.jar;C:\lejos_nxj\lib\pccomm.jar;C:\lejos_nxj\lib\jtools.jar
;C:\lejos_nxj\3rdparty\lib\bluecove.jar;C:\lejos_nxj\lib\classes.jar


What am I supposed to set in classpath?


Although I did get Tune.nxj to work on my NXT.
shortstop
New User
 
Posts: 10
Joined: Thu Dec 27, 2007 1:42 am

Next

Return to NXJ Software

Who is online

Users browsing this forum: Google [Bot] and 6 guests

more stuff