File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Using Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using "-classpath" in javac" Watch "Using "-classpath" in javac" New topic

Using "-classpath" in javac

Joe Cheung
Ranch Hand

Joined: Oct 18, 2002
Posts: 104
If I have many jar files used to compile my java application, can I use wildcard (the example is shown below) in order to eliminating the full paths for each jar files that make the command clumsy?

javac -classpath $THIRDPARTY_HOME/lib/*jar

Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
What happened when you tried it ?

Tim Myer

Joined: Dec 19, 2005
Posts: 2
Take a look at this link for JSE6:
It details the use of wildcards in the java commandline tools that accept the classpath parameter.
I agree. Here's the link:
subject: Using "-classpath" in javac
It's not a secret anymore!