| | |
javac doesn't work
![]() |
•
•
Join Date: Jul 2005
Posts: 13
Reputation:
Solved Threads: 0
I've tried using the javac command inside the command prompt but it says "javac not recognized as an internal or external command". the java command works perfectly fine.
On the other hand, I can compile stuff using the Textpad program.
Anyone know why this might be happening?
Version of Java SDK: 1.5.0_04
On the other hand, I can compile stuff using the Textpad program.
Anyone know why this might be happening?
Version of Java SDK: 1.5.0_04
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
Put a period at the end of your classpath so that it looks like this:
I must warn you though, recently I've learned that setting the classpath variable to tools.jar isn't the best way to do it anymore. It will still work, but it's not recommended by professionals.
Java Syntax (Toggle Plain Text)
.;%classpath%.;C:\Program Files\Java\jdk1.5.0_04\lib\tools.jar.
I must warn you though, recently I've learned that setting the classpath variable to tools.jar isn't the best way to do it anymore. It will still work, but it's not recommended by professionals.
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I'm not sure why that's not working, unless you have more to your classpath. If that's the case, be sure the seperate using a semi-colon(
.
The other(better) way...I really don't know much about it.
See this thread for a little help:
http://www.daniweb.com/techtalkforums/thread26307.html
I really can't help you much with that though. I'm sure Mr. Wenting would be willing to help if you ask.
.The other(better) way...I really don't know much about it.
See this thread for a little help:
http://www.daniweb.com/techtalkforums/thread26307.html
I really can't help you much with that though. I'm sure Mr. Wenting would be willing to help if you ask.
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
No, it has to be one of your path variables. The reason it doesn't work is because it cannot find javac.
Anyways, I'm thinking it could be your Path variable(not the classpath since it looks correct). Please post your PATH variable. You might be pointing it to the jdk directory when you should be pointing it to the jre directory.
The path variable is located at the same place the classpath is, or you can type this at the command prompt:
echo %PATH%
Anyways, I'm thinking it could be your Path variable(not the classpath since it looks correct). Please post your PATH variable. You might be pointing it to the jdk directory when you should be pointing it to the jre directory.
The path variable is located at the same place the classpath is, or you can type this at the command prompt:
echo %PATH%
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
•
•
•
•
Originally Posted by gzero14
Eh where's the edit button...how'd I edit it last time ._.;;
Anyways the restart did it. Though I wonder why the java command would work while javac wouldn't...*shrug*
Sorry, looks like we posted at the same time. Some times you do need to restart your computer for changes to take affect. The java command just invokes the JRE, so no problem should arise there. Anyways, glad you got it fixed.
![]() |
Similar Threads
- javac doesn't work (Java)
Other Threads in the Java Forum
- Previous Thread: Display Text in JSP
- Next Thread: class cast exception
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card character class client code collision component crashcourse css csv database eclipse ee error fractal free game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linux list loan machine map method methods migrate mobile netbeans newbie objects oriented output panel phone physics problem program programming project projects radio recursion replaydirector reporting researchinmotion scanner se server service set sms software sort sql string swing test textfield threads transfer tree trolltech ubuntu utility windows






