10
1
I'm doing some trouble-shooting which requires me to know the default classpath under windows. There's java code which will do this (e.g. http://dev-answers.blogspot.com/2006/06/how-do-you-print-java-classpath.html), but I would really like to see something like you would get from perl -V
:
...
@INC:
/etc/perl
/usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.10
/usr/share/perl/5.10
/usr/local/lib/site_perl
Does Java have a quick command-line way of doing this?
No more direct way to get the info?! – vonbrand – 2013-05-07T23:58:16.393
since the requirement is to get the information from command line, I said this. This is the easiest way in command line. if graphical view is ok, there are tools jvisualvm, jconsole, profilers, etc. From code we can get the same information using System.out.println(System.getProperty("java.class.path")); – K Adithyan – 2013-05-08T06:16:41.473