Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Access class files between two jar files  RSS feed

 
Kishan Kumar
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I have two jar files (jar1 and jar2). I want to have the class files inside jar1 to access a class file in jar2. For that in the manifest file MANIFEST.MF in the /meta-inf directory I have the following entries:
Manifest-Version: 1.0
Main-Class: null
Class-Path: path\jar2.jar
where path is the home directory of jar2.jar
But still the application gives out
"Non-application exception occurred while processing method addFI on bean BeanId(Concert#admiinconejb.jar#relationship, null): java.lang.NoClassDefFoundError: com/medwerks/concert/helper/SEC_AddFI"
The file is jar2 and is called from jar1.
Please specify if any other configuration is requried to make this work.
Thanks for your time.
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The path in manifest Class-Path is relative to the location of the jar. So if jar1 is at /foo/bar/jar1.jar, and jar1 has Class-Path: path/jar2.jar, then jar2 should be at /foo/bar/path/jar2.jar.
Also, you should use forward slashes / in the Class-Path.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!