• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Compiler won't run

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried using % javac, but can't get anything to work. Should I instead be using javac.exe ? This is a first time install on Windows XP Media home edition. I'm totally new to the java programming world. Thanks for any help

C:\Program Files\Java\jdk1.5.0_15\bin>% javac
'%' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Java\jdk1.5.0_15\bin>javac.exe
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings

-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release

-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
 
author
Posts: 23958
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

C:\Program Files\Java\jdk1.5.0_15\bin>% javac
'%' is not recognized as an internal or external command,
operable program or batch file.



The "%" is the command prompt (for many unix shells). You are not supposed to type that part in....


Anyway, it does look like "javac" worked. You just now need the parameters to tell it what to compile.

Henry
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quick tip:

You should seriously consider avoiding the use of white spaces in path names, especially if you're absolutely new to Java.
Once you get to the point where you start learning about class paths, they'll cause you more than enough headaches without the added complexity of having to worry about incorrect path references due to white spaces.
The Program Files folder then is not the most optimal (although default) installation location for the JDK.
 
What are you doing? You are supposed to be reading this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic