• 13
• 16
• 27
• 9
• 9

# Adding Further Command Line Executables To Windows?

This topic is 4474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have the Java SDK 1.5 and in it there is a /bin that contains the tools. Now i wanted to have these run from the command line without being in the directory /bin. So i copied the contents of /bin to /windows/system32 and they run fine. The problem lies in the fact that i get the following javac error when i compile any .java file using the system32 javac exe: Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/ ain If i move the file i am compiling to the JDK directory and compile using the /bin exe it works with no errors. So is there anything i am missing out when adding executables to the command line tools in Windows XP? Dave

##### Share on other sites
Add the java/bin directory to the PATH. From the System Properties dialog locate the Advanced tab, click the Environment Variables button. At the bottom there should be a list of system variables, locate the "Path" variable and add the appropriate java directory to the list. Use a semi-colon to seperate paths.

You'll probably want to return the stuff you copied into system32 back to /bin.

The HotKey for the system properties dialog is <windows key + break key>

thanks.

##### Share on other sites
Sure thing. Back in the days of autoexec.bat files, it paid to know about environment variables.

##### Share on other sites
Hey,

Well i tried it and cmd is not recognising javac.

Path looks like this:
C:\Program Files\Alias\Maya 6.0 Personal Learning Edition\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\PROGRA~1\COMMON~1\ULEADS~1\Mpeg;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Java\jdk1.5.0_05\bin

Any ideas?

##### Share on other sites
There are other Java related environment variables to deal with, CLASSPATH for example. This reference, Environment Variables, might help. It covers quite a lot of ground related to E.V.s.