We help IT Professionals succeed at work.

Java command syntax error using Java plug in, jdk1.70

boshenska
boshenska asked
on
c:\program Files\Java\jdkl . 7.0_01\bin>javac.exe <c:\Java\HelloworldApp.java>
The syntax of the command is incorrect.

c:\program Files\Java\jdkl.7 .0_01\bin>

Whats wrong with my syntax
Comment
Watch Question

Most Valuable Expert 2011
Top Expert 2015

Commented:
Remove the < .
Most Valuable Expert 2011
Top Expert 2015

Commented:
...and the ending > .
HainKurtSr. System Analyst

Commented:
you may need to use "

javac.exe "c:\Java\HelloworldApp.java"
Most Valuable Expert 2011
Top Expert 2015

Commented:
You should only need quotes if the path to the file contains spaces.
HainKurtSr. System Analyst

Commented:
"You should only need quotes if the path to the file contains spaces."

or maybe some special characters in path other than space

correct, that's why I used "may" :)
Most Valuable Expert 2011
Top Expert 2015
Commented:
or maybe some special characters in path other than space
Space is the only special character in Windows that needs to be quoted, and that's because the shell uses space as a delimiter for command line arguments. You can get around this by using the old 8.3 naming format also.

that's why I used "may"
I understand. I'm just adding to your comment. Using quotes doesn't hurt anything. I was just trying to point out when it is absolutely required to use them  = )