This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Class-Path in manifest not picking up properties file

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I currently have a jar file which requires a properties file (jndi.properties) on the classpath.

The properties file is in the same directory as the jar file, and the Class-Path: attribute of the manifest file contains the value '.', as well as all the other library dependencies. However, for some reason this file isn't being found on the classpath.

Does anyone have any idea how I can get this file placed on the classpath using the Class-Path attribute?
 
Rancher
Posts: 5013
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure where the folder pointed to by . is when used in a Manifest file.
How are you executing the jar file? Where is the current directory?

If no one knows for sure, try salting all the possible locations with same named files that have their folder location in them so when the file loads you can tell where it came from.

[ June 30, 2008: Message edited by: Norm Radder ]
[ June 30, 2008: Message edited by: Norm Radder ]
 
Norm Radder
Rancher
Posts: 5013
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I searched the Java Tutorial 1.5 and found the following:
Location in my version:

file:///E:/Java/Tutorial/ext/basics/download.html


Copy of some of the text:


If an applet or application uses more than one extension, you can list multiple URLs in a manifest. For example, the following is a valid header:

Class-Path: area.jar servlet.jar images/

In the Class-Path header any URLs listed that don't end with '/' are assumed to be JAR files. URLs ending in '/' indicate directories. In the preceding example, images/ might be a directory containing resources needed by the applet or the application.

 
I knew that guy would be trouble! Thanks tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic