• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dan't figure out how to compile.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so I've got the book Head First Java and I've downloaded and set up everything it said I needed to. I've created the MyFirstApp.java file in wordpad (I made sure to get rid of the .txt extension).

Now here's my hard part. Compiling it.

How do I ad an entry to my path enviroment variable inside my main java directory (C:\Java)?

After that, I actually compile the code typing '% javac' at the command line . . . of what? Command Prompt?

The book shows compiling (once you get past all that stuff) being as simple as "javac MyFirstApp.java", but I'm finding this much more difficult.

I feel I've overlooked something simple, or there's some common knowledge that I've yet to know. Any help explination, or correction to what I'm doing would be greatly appreciated.
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These two pointers should help.



http://www.computerhope.com/issues/ch000549.htm

http://www.wilsonmar.com/1envvars.htm
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I ad an entry to my path enviroment variable inside my main java directory (C:\Java)?

How you add an entry to your PATH environment variable depends on your OS. Stewart pointed you to the instructions for changing your PATH environment variable if you are using WinXP or Win2k. If you are using Win9x or Linux or a Mac, the instructions will be different.

After that, I actually compile the code typing '% javac' at the command line . . . of what? Command Prompt?

Again this depends on which OS you are using. If you are using Linux/Mac, you type "javac MyFirstApp.java" at the command prompt which may look like '%' (if you are using c-shell). If you are using Windows, your command prompt will look more like 'C:\>'. In either case, you type

javac MyFirstApp.java
 
Kyle Skully
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you both. All three links (even the one in Myrilyn's sig) helped a lot.

 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic