Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new to programming, sadly already snagged before i can start

 
harry winkler
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
trying to set up the path variable.

i downloaded and installed java 1.7 jdk.

copied the path to the bin folder and pasted it in the path environment variable. I am trying to run my simple java.class from command line. Keep getting this error.

>%java MyFirstApp
'%java' is not recognized as an internal or external command,
operable program or batch file.

% java MyFirstApp
'%' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files\Java\jdk1.7.0_03\bin;C:\Program Files (x86)\AMD APP\bin\x86;C:\Users\bkramer\Documents\AMD APP\bin\x86_64;C:\Users\bkramer\Documents\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD APP\tools\AMD APP KernelAnalyzer 1.9\;C:\Program Files\Java\jre7\bin;

i know stupid question but its really bothering me.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm not sure what operating system you are using...but i think you are using windows. the example is probably for a unix-like system.

The upshot being...don't type the "%".
 
harry winkler
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:i'm not sure what operating system you are using...but i think you are using windows. the example is probably for a unix-like system.

The upshot being...don't type the "%".


wow, well that was the answer.

thanks.

I am an idiot.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49391
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, somebody has confused you by showing the prompt, which is not actually %.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a lot to learn when you first start programming. And, us old-timers forget how much stuff we assume everyone knows, when it is not necessarily true.

Don't feel like an idiot. Ask questions - it's why we're here.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic