How to Set Java ClassPath Variable?

June 27, 2011 at 09:44:05
Specs: Windows 7
How to Set Java Class Path Variable

Hi I am trying to set up Java and TextPad at my home computer. I successfully installed TextPad and Java. I added "javac" and "java" to my textpad tools as I read that javac is the compiler and java runs java applications. I opened a program that I wrote on a computer with textpad and java already set up. I can compile it but when trying to run it I get java.lang.NoClassDefFoundError exception. After some research I found that this means the CLASSPATH or PATH is not set. I was told to go to Control Panel\System\Advanced\Environment Variables and add the directory of the Java bin to the PATH variable. I added the java\bin directory to the PATH variable and I still get the same exception. Any advice would be appreciated.

See More: How to Set Java ClassPath Variable?

Report •

July 2, 2011 at 20:30:18
I actually solved this problem myself. I looked at the way Textpad is configured on my school computers and found a great difference in the tools section. If you go to the tools section and expand it and look at javac and java you will notice there are fields such as command, initial folder, and parameters. Command needs to just say "javac.exe" for javac and "java.exe" for java. parameters should say $BaseName and initial folder should read $FileDir. i have seen a lot of ppl on the internet with problems setting up textpad so if anyone has a question about this ask because I got it to work on my Windows 7 home PC.

Report •
Related Solutions

Ask Question