Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

Java and PATH variable on Windows XP

Thread view: 
Mike - 17 Mar 2004 22:50 GMT
I have recently installed Java 1.4.2 on Windows XP.

I can compile and execute programs without problems but I am curious as to
how, when I open a CMD window, java, javac etc are in my PATH when I have
not set up my PATH variable?

Here's an example:

C:\Documents and Settings\user>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

C:\Documents and Settings\user>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

I think if my memory serves me correctly I installed Java as part of a
Netbeans download - not sure this makes a difference.

Just curious.

Thanks.
Ryan Stewart - 18 Mar 2004 00:21 GMT
> I have recently installed Java 1.4.2 on Windows XP.
>
[quoted text clipped - 18 lines]
>
> Thanks.

Are you sure that javac works? java.exe will work because it gets put in
c:\windows\system32.
Andrew Thompson - 18 Mar 2004 05:05 GMT
> "Mike" <none@none.com> wrote in message
...
>> I can compile and execute programs without problems but I am curious as to
>> how, when I open a CMD window, java, javac etc are in my PATH when I have
>> not set up my PATH variable?
..
>> C:\Documents and Settings\user>echo %PATH%
>> C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
>>
>> C:\Documents and Settings\user>java -version
>> java version "1.4.2_03"
..
> Are you sure that javac works? java.exe will work because it gets put in
> c:\windows\system32.

I can invoke java with no prefix/path,
but javac, javadoc ets. all require it.

I suspect the OP's IDE has set-up the
path for the others.

Signature

Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology

Casey Hawthorne - 18 Mar 2004 07:39 GMT
Look in:
Control Panel
System
Advanced
Environment Variables

The IDE/package will put them there and/or you can edit them yourself.

Regards,
Casey
Andrew Thompson - 18 Mar 2004 07:55 GMT
> Look in:
> Control Panel
....
> The IDE/package will put them there and/or you can edit them yourself.

That's bad.  Sun recommends that
you should set cp attributes on a
project by project basis.  

Signature

Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.