• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Yup... another one! JDK, Javac, etc :)

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've waded through the topics here on the forum, on sun's website, and on/offline documentation here and there, but have not gotten an answer that could get me make a step forward.

I have a laptop with Vista (the humanity!) and first wanted to download a JDK to get started on my Head First Java. It took me a while to figure out what Java 1.6.0 and Java 6 is (the same), and then I spent quite some time figuring out wich version I should take. Version 3, netbeans version, umbrella version, "let's make your life even more difficult with yet another" -version, etc. In the end I just closed my eyes and clicked :-) So, now I have Java JDK 6 (1.6.0) version 3, and then I ended up searching where the frick it was in my start menu>programs. Turns out there isn't a GUI for it, and it was hidden in the bowels of Vista.

Anyways, I made a map, and put my helloworldapp.java in it. As in the example on the sun website to make a class out of it, I went to the command line, and typed the line in. Got a message; 'javac' is not recognized as an internal or external command,
operable program or batch file.


Did some searching, lots of reading, and ended up at sun's "path variabels" documentation. This is what I put in:

Variable name: Java
Variable value: C:\Program Files\Java\jdk1.6.0_03\bin

for both the user and system variables. In the command prompt I looked up my helloworldapp.java file, and put javac in front of it, but, to no avail again; same message...

What am I doing wrong? It seems like university is needed to get started on Java
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by B Gr:
Anyways, I made a map, and put my helloworldapp.java in it. As in the example on the sun website to make a class out of it, I went to the command line, and typed the line in. Got a message; 'javac' is not recognized as an internal or external command, operable program or batch file.

Did some searching, lots of reading, and ended up at sun's "path variabels" documentation. This is what I put in:

Variable name: Java
Variable value: C:\Program Files\Java\jdk1.6.0_03\bin

for both the user and system variables. In the command prompt I looked up my helloworldapp.java file, and put javac in front of it, but, to no avail again; same message...



I'm not quite sure what you mean by "I made a map...", but regarding "path variables", the Variable name is PATH. I'm sure you already have an environment variable by that name. You want to add to the PATH, not replace it. So find "PATH" in your variables and edit it to put C:\Program Files\Java\jdk1.6.0_03\bin; in front of the stuff that's already there (including the semicolon).
Then you open the command prompt and cd (change directory) to the location of your helloworldapp.java file. For example, cd C:\Java and type javac helloworldapp.java (so you see C:\>javac helloworldapp.java)
When you get your command prompt back, you type java helloworldapp (C:\>java helloworldapp)
[ December 21, 2007: Message edited by: Marilyn de Queiroz ]
 
Besjamain Greenaway
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much After a good night sleep my brains felt rejuvenated, and got it working thanks to your explanation!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"B Gr", please check your private messages. You can see them by clicking My Private Messages.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To change the path environment variable in Vista:

1. Click Start and choose Control Panel
2. In the Search box on the top right of the window type �system path� (no quotes)
3. Click �Edit the system environment variables�
4. The Advanced tab of the System Properties dialog box is shown. Click the Environment Variables button on the bottom right.
5. In the lower box titled �System Variables� scroll down to Path and click the Edit button.
6. Change your path as need be.
7. Restart your system. The system path environment variable change will not be in effect until the computer is restarted.
 
Well THAT's new! Comfort me, reliable tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic