Skip to main content
GameDev.net gamedev.net
🔒 Locked

Adding Further Command Line Executables To Windows?

Started by dave Dec 16, 2005 at 7:47 PM 5 replies 500+ views
Original Post
dave
dave
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
LessBread
LessBread
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
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
dave
dave
More bread, more bread i cry!!

thanks.
LessBread
LessBread
Sure thing. Back in the days of autoexec.bat files, it paid to know about environment variables.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
dave
dave
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?
LessBread
LessBread
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.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
dave
dave
I found that all that was needed was to reload cmd.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.