View Single Post
Old 03-31-2008, 11:50 AM   #1 (permalink)
sbussy89
Registered User
 
Join Date: Aug 2007
Posts: 52
OS: Windows Vista Home Premium


Command Line Programming

OK, I need help. I'm learning Java for the first time and using command line programming for the first time. My book says to install javac (which I did), and then open a command prompt and type "javac HelloJava.java." When I do this, I get the error "'javac' is not recognized as an internal or external command, operable program or batch file." I realized that this was because, even though the book said type the command EXACTLY, javac.exe is not in C:, it's in C:\Program Files\Java\jdk1.5.0_02\bin. So, I change my directory to now be C:\Program Files\Java\jdk1.5.0_02\bin, and type "javac HelloJava.java" and get the error "error: cannot read: HelloJava.java." The source file is saved to C:\Java Examples\examples\ch002. So now I use the commands "javac C:\JavaExamples\examples\ch002\HelloJava.java" and "javac \JavaExamples\examples\ch002\HelloJava.java", but neither work. how do I do this??????
sbussy89 is offline   Reply With Quote