Wondering what will be the default classpath when not specifying classpath option?
Wondering what will be the default classpath when not specifying classpath option?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The current working directory (
.).From The Java™ tutorials: PATH and CLASSPATH:
Does this include subdirectories?
No, no entry in the classpath is “recursive”. You have to list each subdirectory (or jar) explicitly. However, if you have an
Example.classfile representing classpkg.subpkg.Example, and the default classpath is used, then this file should live in./pkg/subpkg/Example.class.If
javaattempts to resolvepkg.subpkg.Exampleit will look in/pkg/subpkgof each classpath entry. I.e. you do not have to list.,pkg, andpkg/subpkgin the classpath, only..