• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to invoke javac from cmd prompt

 
Mollu James
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there!
I am trying Java for the first time. I added the following to the Path variable:
C:\Program Files\Java\jdk1.7.0_11\bin
at the cmd prompt, i type % javac, like C:\>% javac, and it says :
% is not recognized as an internal or external command, operable program or batch file.

so i try just javac, like C:\>javac and i get:
Usage: javac <options> <source files>
where possible options include:
and a whole list of variables...

I am using Windows 7, i installed Java SE 7u11 JDK from the Oracle download site.

What am i missing?

Thanks,
M.
 
Aj Prieto
Ranch Hand
Posts: 75
Android Chrome Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To compile:


To run:
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instructions may have said %javac, but the % sign there represents the prompt character. Miss out the % and it should work better
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic