How can i check whether a package like javax.servlet.* exists or not in my installation of java?
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.
Java can only tell you if it can load a class. It can’t tell you if a package exists or not because packages aren’t loaded, only classes.
The only way would be by trying to load a class from that package. e.g., For javax.servlet.* you could do: