File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Finding a file in classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Finding a file in classpath" Watch "Finding a file in classpath" New topic
Author

Finding a file in classpath

Nehal Dave
Greenhorn

Joined: Dec 22, 2000
Posts: 28
Hi
I need to know how can we validate an import statement.
For e.g
import com.javaranch.ABC;
I need to find out if com.javaranch.ABC class is present in my classpath.
Any ideas?
Thanks
Nehal.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
You could try
Class.forName("com.javaranch.ABC")
or
ClassLoader.getSystemResource("com/javaranch/ABC")


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding a file in classpath
 
Similar Threads
how to import package
doPost() & doGet()
JSP +Bean/EJB
executing java program from java
how to add mail.jar to classpath?