Java compile Error

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Java compile Error

Post by bat2004 on Wed Jun 04, 2008 8:17 am
([msg=3990]see Java compile Error[/msg])

I just starting to learn Java, but i cant compile any of my .java files source codes in cmd, i get a error that says, Javac command is not found, i looked this up and found out how to slove the problem by setting a path varible, but it does not seem to be working for me.

I have a path varible set in the system and user varible, both with values "C:\Program Files\java\jre1.6.0_06\bin\". I have also tried compiling in the /bin folder, with source file in it with no luck. The command i am typing in cmd, is

javac nameofsourcefile.java

Hope someone can help me out, thanks.
bat2004
New User
New User
 
Posts: 2
Joined: Wed Jun 04, 2008 8:09 am
Blog: View Blog (0)


Re: Java compile Error

Post by phicar on Fri Jun 20, 2008 9:30 am
([msg=5337]see Re: Java compile Error[/msg])

you're trying to compile in the jre, that is just the runtime, try to download the jsdk
phicar
New User
New User
 
Posts: 1
Joined: Fri Jun 20, 2008 9:27 am
Blog: View Blog (0)


Re: Java compile Error

Post by Dosuos on Mon Jun 30, 2008 12:03 pm
([msg=6138]see Re: Java compile Error[/msg])

I assume you have jdk installed in your system too.
Looking at the jre path you wrote, I think it is installed under jdk1.6.0_06 folder.

If it the case then set PATH variable to "C:\Program Files\java\jdk1.6.0_06\bin\".
Dosuos
New User
New User
 
Posts: 6
Joined: Sun Jun 29, 2008 1:52 pm
Blog: View Blog (0)


Re: Java compile Error

Post by Sharmz on Mon Jul 14, 2008 1:46 pm
([msg=7411]see Re: Java compile Error[/msg])

bat2004 wrote:I just starting to learn Java, but i cant compile any of my .java files source codes in cmd, i get a error that says, Javac command is not found, i looked this up and found out how to slove the problem by setting a path varible, but it does not seem to be working for me.

I have a path varible set in the system and user varible, both with values "C:\Program Files\java\jre1.6.0_06\bin\". I have also tried compiling in the /bin folder, with source file in it with no luck. The command i am typing in cmd, is

javac nameofsourcefile.java

Hope someone can help me out, thanks.

I have the same problem and my classpath is set to "C:\Program Files\java\jdk1.6.0_06\bin\".
"You must be the change you wish to see in the world."
-Mohandas Karamchand Gandhi
"Be nice to nerds. Chances are you'll end up working for one."
-Bill Gates
Sharmz
New User
New User
 
Posts: 41
Joined: Thu May 29, 2008 1:18 am
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests