|
-
Jun 5th, 2005, 02:17 AM
#1
Thread Starter
Member
How do I compile .java into .class?
I dont know how to do this and i dont want that online one, I need to compile them manually (prob from .bat?) If you know how to compile java files it'd be very helpfull if you could post it.
thanks
Last edited by NoteMe; Jun 6th, 2005 at 01:49 AM.
-
Jun 5th, 2005, 06:25 AM
#2
Frenzied Member
Re: How do I compile .java into .class?
goto the command line....(Consider you have your path variables set)
get to the current directory the file is in:
cd/directory
then to compile:
javac FileName.java
then to run:
java FileName
-
Jun 5th, 2005, 05:43 PM
#3
Thread Starter
Member
Re: How do I compile .java into .class?
I get this error:
'javac' is not recognized as internal or external command, operable program or batch file.
I think I have to set it up in my Environment Variables saying the class path to my java, But i dont know what it is :'( Anyway to fix this?
-
Jun 5th, 2005, 05:50 PM
#4
Thread Starter
Member
Re: How do I compile .java into .class?
 Originally Posted by System_Error
(Consider you have your path variables set)
Ah, never saw that, what do you have your path variables set as? I've tried this
PATH
C:\Program Files\Java\jdk1.5.0_03\bin
and it didnt work
**Edit:
I played around and it worked! so if someone else is having trouble
right click "my computer" go to "advance" go to envirmental variables > click on "new" and type this in if you have jdk 1.5.0_03 installed
PATH
%:\Program Files\Java\**java version**\bin
for me it was C:\Program Files\Java\jdk1.5.0_03\bin
if that doesnt work, do the same thing and estead of typing in PATH, type in JAVAC.
-
Jun 5th, 2005, 06:03 PM
#5
Dazed Member
Re: How do I compile .java into .class?
You can always use the -classpath switch.
C:\jdk1.5.0_03\bin> java -classpath C:\classfiledir; classfile
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|