Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 9th, 2006, 10:21 AM
Registered User
 
Join Date: Mar 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jared_edge Send a message via MSN to jared_edge
Default need help with javac

I am trying to learn java. I have jdk 1.5 installed. I'm reading Ivor Horton's: Beginning Java 2. Just working through the first chapter. there is a program to try out the compiler. I wrote out the code exactly like it's written, saved it as a .java file in directory i called program.

I am running Win98 SE, when i go into command.com and try to follow instructions to compile the code file I made, I get "bad command or file name" why? Whats wrong? I don't understand. It sounds so easy.

C:\>dir program

 Volume in drive C has no label
 Volume Serial Number is 3665-1CD6
 Directory of C:\Program

. <DIR> 03-08-06 10:10a .
.. <DIR> 03-08-06 10:10a ..
ROME~1 JAV 133 03-09-06 8:11a Rome.java
MYPROG~1 JAV 138 03-09-06 8:11a MyProgram.java
         2 file(s) 271 bytes
         2 dir(s) 2,603.93 MB free

C:\>javac Program\Rome.java
Bad command or file name

C:\>cd program

C:\Program>javac Rome.java
Bad command or file name



 
Old March 9th, 2006, 10:00 PM
Registered User
 
Join Date: Mar 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jared_edge Send a message via MSN to jared_edge
Default

I thought maybe it was a problem with my PATH
it is set though. set to a few things and i don't know how to get rid of them. but the command "java" works, but not "javac"

 
Old March 10th, 2006, 02:13 AM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Find out the directory at which javac locates, then add the directory to the PATH environment variable

 
Old March 11th, 2006, 04:37 AM
Registered User
 
Join Date: Mar 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jared_edge Send a message via MSN to jared_edge
Default

thanx for reply. I got it all working now. My Configuration program for network card was locking up my computer. I felt it was time for a reformat so i did. I installed JDK clean and set my PATH. Frustration is over.






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with javac gpauta JSP Basics 1 June 22nd, 2004 02:29 PM
problem with javac gpauta JSP Basics 0 June 12th, 2004 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.