Forums Register Login

Compiler won't run

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
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.
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 683 times.
Similar Threads
Error compiling the AdviceClient.java
assert - Usage
AdviceClient compiler error in HFE
can't start compiler
problem in enhanced for loop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:24:19.