This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 9303
    
  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: 3833

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: 9303
    
  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...
 
GeeCON Prague 2014
 
subject: *.jar