• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiler won't run

 
John Panos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using % javac, but can't get anything to work. Should I instead be using javac.exe ? This is a first time install on Windows XP Media home edition. I'm totally new to the java programming world. Thanks for any help

C:\Program Files\Java\jdk1.5.0_15\bin>% javac
'%' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Java\jdk1.5.0_15\bin>javac.exe
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

-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
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
 
Henry Wong
author
Marshal
Pie
Posts: 21490
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\Program Files\Java\jdk1.5.0_15\bin>% javac
'%' is not recognized as an internal or external command,
operable program or batch file.


The "%" is the command prompt (for many unix shells). You are not supposed to type that part in....


Anyway, it does look like "javac" worked. You just now need the parameters to tell it what to compile.

Henry
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick tip:

You should seriously consider avoiding the use of white spaces in path names, especially if you're absolutely new to Java.
Once you get to the point where you start learning about class paths, they'll cause you more than enough headaches without the added complexity of having to worry about incorrect path references due to white spaces.
The Program Files folder then is not the most optimal (although default) installation location for the JDK.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic