Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Multiple jar declaration in Class-Path attribute in jar's Manifest file  RSS feed

 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

My Class-Path: attribute in manifest file looks like below -

Class-Path: activation-1.1.jar activemq-all-5.3.0.jar commons-codec-1.3.jar commons-httpclient-3.1.jar commons-logging-1.1.1.jar commons-pool-1.5.6.jar jdom-0.7.jar json.jar log4j.jar looksdemo-2.3.1.jar mail.jar openrdf-sesame-2.3.1-onejar.jar slf4j-api-1.5.8.jar slf4j-nop-1.5.8.jar xercesImpl.jar

All the mentioned jar files resides in the same directory (Windows) along with my custom jar.

Is there a simple way to specify the Class-Path: attribute to look into a single folder or the folder where my custom jar (MyApp.jar) is present?

Say like - Class-Path: ./* or Class-Path: /*.jar or Class-Path: /*.* or even Class:Path : C:/MyLibrary/*.jar

Please note that the my current big Class-Path: works perfectly fine. Just want to know if there is an alternative like I do below when i execute without a jar file -
java -classpath ".;C:\MyLibrary\*" MyClass


Thanks much!
John


 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html
from the above url, under *Understanding class path wildcards* :


class path wildcards are not honored in the Class-Path jar-manifest header

 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SeethaRaman,

Thank you for your reply.... i will have it as it is then!

Thanks much!
John
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

John Jai wrote:SeethaRaman,
Thank you for your reply....


you are welcome
 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you want that eclipse will find all the jars in a single folder then i think it will become easier by creating a target directory..

However it is mostly used in Eclipse RCP but i am not sure whether you can use it in normal eclipse development or not.

Try to create a target platform and put all the jars in it or see whether it works or not
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one more thing you can also create a user library in eclipse where you can select complete folder in a single go..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!