• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

new to programming, sadly already snagged before i can start

 
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.
 
lowercase baba
Posts: 12766
51
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.
 
Marshal
Posts: 65814
250
  • 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
Posts: 12766
51
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.
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!