aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes *.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "*.jar" Watch "*.jar" New topic
Author

*.jar

Balaji Bang
Ranch Hand

Joined: Apr 23, 2007
Posts: 180
Suppose we have a jar file in a directory called jars. can we set the path like /jars/*.jar;

What it means (*.jar)...
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

Suppose we have a jar file in a directory called jars. can we set the path like /jars/*.jar;


it means include all the files which has a extension of .jar


SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

I don't think that you can do this. You'll have to include the name of the individual jar files in the class path. You can't say *.jar to include all the .jar files in the classpath...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3855

Ankit Garg wrote:I don't think that you can do this. You'll have to include the name of the individual jar files in the class path. You can't say *.jar to include all the .jar files in the classpath...


It is possible with JDK 6 classpath wildcards


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

Hmm I didn't knew that. Actually I tried it as a command line argument to the -cp option of java and javac command and it didn't work. Looks like it only works for classpath environment variable...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: *.jar