Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Also new to Java  RSS feed

 
Per Blindheim
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just installed version J2SE Development Kit 5.0 Update 4, but I am unable to get things right. I'm running XP Professional SR2 and have appended my install dir to the path. I have double-checked the PATH many times and it is the correct one. I am absolutely a very, very green rookie.

According to "Head First Java", I shall use "% javac" in the command prompt but I alternatively get two errors, one: "error cannot read XXX.java" and two:'%' is not recognized as an internal or external command, operable or batch file.
Using just "javac" does not help either.

What am I doing wrong.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37234
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Per,
Welcome to JavaRanch!

I think "%" is the prompt. Normally, you just type in "javac."

The "error cannot read XXX.java" sounds like you are finding javac. You can verify this by typing "javac -help". If this comes back with a list of options, java is installed fine. Then you can check if your java file exists and is in the same directory. If "javac -help" gives you an error message, you can try moving the install directory to the beginnng of the PATH.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Per Blindheim:
I ... have appended my install dir to the path. I have double-checked the PATH many times and it is the correct one.

You should append (install dir)/bin to the path. You may need to move it to the front of the path.
[ July 17, 2005: Message edited by: Marilyn de Queiroz ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!