• 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

% javac (help)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just installed j2sdk version 5.0 and i think i've correctly set my path environments correctly, however, this book i bought (i think) says that i should basically (at the command prompt? - using windows xp) be able to type in % javac <name of source document> and it will compile. instead i have to change directories to the path where my compiler is located and do it there. i have succesfully compiled that way, but i was hoping to make the % javac thing work, but it sells me it's not a correct batch. anyway, thanks.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert,

Welcome to JavaRanch!

That "%" is the operating-system prompt on Mac OS X and on other typical UNIX systems; you're not supposed to type it. Imagine your book says

C:\> javac Foo.java

instead -- and just type starting with the word "javac".
 
author
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A couple of other things to check, if the problem isn't that you are typing %:

1. In a DOS window, type:

echo %path%

and make sure that you see the path to the "bin" subdirectory of your Java home directory as one of the entries.

2. Type the command:

java -version

to ensure that the JVM can be found.

3. If you then still cannot successfully get the command:

javac filename.java

to work, it's possible that you accidentally downloaded the Java Runtime Environment (JRE) vs. the Java developers kit; the JRE does *not* come with javac.exe.
 
robert michael
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks! that helped a lot. =)
reply
    Bookmark Topic Watch Topic
  • New Topic