: Hello,
: I am a complete newbie, trying to get a "hello world" type program to run. I have the "j2sdk1.4.2_08" of java. My problem is as follows: I go to the start menu, click on the "run" botton, type in "cmd", and type "cd C:/j2sdk1.4.2_08" into it. now I type "dir",I type in C:\j2sdk1.4.2_08\bin/javac.exe (where java is located on my computer) javac javatest.java.txt. When I attempt this, the following appears on the screen:
: " 'C:/j2sdk1.4.2_08/bin.exe' is not recongized as an internal or external command, opperable program or batch file.
:
: C:\j2sdk1.4.2_08>C:\js2dk1.4.2_08\bin\javac.exe javac javatest.java.txt
: javac: invalid flag: javac
: Usage: javac <options> <source files>
: were 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
: -verbose Output messages about what the compiler is doing
: -depreciation Output source locations where deprecated APIs are used
: -Classpath <path> Specifiy where to find user classs files
: -sourcepath <path> Specify where to find input source files
: -bootclasspath <pathH? Override locaiton of bootstrap class files
: -extdris <dirs> Override location of installed extensions
: -d <directory> Specify where to place generated class files
: -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
: -help Print a synopsis of standard options"
:
: Any and all help will be appreciated.
:
: Thanks in advance,
: aticper.
:
: (note: the error message is hand typed, so if anythng looks like it might be a typo, it probably is).
:
:
Try setting up your compiler properly so you do not have to include the path to javac on the command line.
http://java.sun.com/developer/onlineTraining/new2java/programming/learn/
When you set up your classpath, put the path to bin at the front of the string, if you are using windows, there is a weird bug that causes problems if it is put at the end. Do not forget to add a ; at the end of the path to bin. Also try not to put your .java files in the java directory, create a seperate directory for your programs.