• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to check classpath, installed by JDK, in Windows XP?  RSS feed

 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having installed JDK1.3.1,
I cannot find pointers to JDK's subdirectories with jars neither in CLASSPATH nor in Registry.
I.e. j2sdk-1_3_1_01-win.exe produces 3 java.exe:two in configurable paths like
1)j:\ jdk1.3.1_01\bin
2)j:\ jdk1.3.1_01\jre\bin.
and one appears under XP Windows Program Files (without possibility to indicate another path):
3)J:\Program Files\JavaSoft\JRE\1.3.1\bin
While 2) corresponds to JRE,and 3) – to Java PlugIn, what is 1) for?
What are the differences? especially between 1) and 2), they have different size.
Whether they load local classes and from where? I do not have any jars from jre subdirectories in classpath. The registry also does not point to subdirs with any jars from jre)
BTW, after JDK's installation I can run java, but in order to run javac/jar, I should manually adjust the PATH. Why it is not configured by installation?
 
Marilyn de Queiroz
Sheriff
Posts: 9082
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM already knows where to look for the built-in classes (like java.lang.String, etc) and jars(like rt.jar). You do not need to put them in a classpath.

In the CLASSPATH you need to put the route to your classes that you compiled (where MyClass.class will be found after it is compiled from MyClass.java).

As far as I know, the jdk makes no changes to the CLASSPATH on installation.

Your question about the PATH is answered in the other thread.
[ November 24, 2002: Message edited by: Marilyn de Queiroz ]
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marilyn de Queiroz,
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marilyn,
this is curious how does it know and from where does it take, if I have various JDK/JRE installed? and I change default path during installation
 
Marilyn de Queiroz
Sheriff
Posts: 9082
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Until recently it was in the System Environment Variables. Currently, as far as I know, the Windows registry keeps track of which jdk/jre version to use. If you have several, I would think that the last one you installed would be the one in the registry.

You could type
"java -version"
to see which version of the jdk you are using.

When you type "java MyClass" and thus start the JVM (java virtual machine), it (the JVM) will figure out where the jars that it needs are so it can use them.
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
Though, I believe, I checked what I have had asked
[ November 29, 2002: Message edited by: G Vanin ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!