How do I set programs to be run from the command prompt by typing their name?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Trag

Thread Starter
Joined
Sep 10, 2003
Messages
72
I'm just wondering how I can set the command prompt (winXP) to start up javac.exe(or any other program) when I type javac at the prompt.

Thanks

Joel
 
Joined
Aug 1, 2003
Messages
51,988
Put the path in the environment variables in My Computer properties, Advanced.
 

Trag

Thread Starter
Joined
Sep 10, 2003
Messages
72
Hmm, I did that, and restarted my computer, but no luck. Anyone know what I did wrong?

Joel
 

Trag

Thread Starter
Joined
Sep 10, 2003
Messages
72
I did that, but still no luck. I restarted too, but that didn't do anything either. Do I need to put the name of the file in another variable as well?

Joel
 

Trag

Thread Starter
Joined
Sep 10, 2003
Messages
72
My path variable is below. The files I am trying to add, along with their paths are below as well. The files are: gcc.exe, g++.exe and javac.exe.
I have tried both with and without the .exe extension as well.

%SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;
C:\Program Files\Common Files\Adaptec Shared\System;
C:\GTK\2.0bin;
C:\mingw\bin\gcc.exe;
C:\mingw\bin\g++.exe;
C:\j2sdk1.4.2_04\bin\javac.exe;

Thanks

Joel
 
Joined
Aug 1, 2003
Messages
51,988
The last are the ones you added? You need to specify the directories for the path and not the specific executables or other individual files:

%SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;
C:\Program Files\Common Files\Adaptec Shared\System;
C:\GTK;
C:\mingw\bin;
C:\j2sdk1.4.2_04\bin

Then, you should be able to execute javac.exe by typing "javac" in the Run box.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top