classpath in ubuntu 12.10

41 views
Skip to first unread message

Alok Singh Mahor

unread,
Apr 3, 2013, 7:27:48 PM4/3/13
to iitdlug
Hi all,
I am not able to see value of $CLASSPATH variable.
where is the classpath vlue is saved in ubuntu 12.10?

but by -verbose option I can see the search path of class file. but class path must must have saved somewhere so javac is looking for classes.

alok@alok:~/exp/java$ javac alok.java -verbose
[parsing started RegularFileObject[alok.java]]
[parsing completed 25ms]
[search path for source files: .]
[search path for class files: /usr/lib/jvm/java-7-openjdk-i386/jre/lib/resources.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/rt.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/sunrsasign.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/jsse.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/jce.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/charsets.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/netx.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/plugin.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/rhino.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/jfr.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/classes,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/zipfs.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/sunjce_provider.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/sunpkcs11.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/pulse-java.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/dnsns.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/java-atk-wrapper.jar,/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/localedata.jar,.]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/lang/String.class)]]
[checking alok]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/lang/AutoCloseable.class)]]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/lang/System.class)]]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/io/PrintStream.class)]]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/io/FilterOutputStream.class)]]
[loading ZipFileIndexFileObject[/usr/lib/jvm/java-7-openjdk-i386/lib/ct.sym(META-INF/sym/rt.jar/java/io/OutputStream.class)]]
[wrote RegularFileObject[alok.class]]
[total 256ms]

by seeing the output i can tell that classpath is /usr/lib/jvm/java-7-openjdk-i386/jre/lib/*:.
but where this value is stored so javac is looking at these paths?

Supreet Sethi

unread,
Apr 4, 2013, 3:06:08 AM4/4/13
to iit...@googlegroups.com
There are certain classpaths which are default like the one you have pointed out. You can add your code base also by passing parameter -classpath or setting environment variable CLASSPATH


--
--
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
 
---
You received this message because you are subscribed to the Google Groups "Linux User Group @ IIT Delhi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iitdlug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Supreet Sethi
Ph IN: +919811143517
Ph Skype: d_j_i_n_n
Profile: http://www.google.com/profiles/supreet.sethi
Twt: http://twitter.com/djinn
Reply all
Reply to author
Forward
0 new messages