manifest.mf

How do you create a MANIFEST.MF that's available when you're testing and running from a jar in production?

I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it. I just want to know the proper way to add versioning to my Java app so that I can access the version information when I'm testing, e.g. debugging in Eclipse and runn...

Java Manifest.mf classpath issues

Hi all - I've been trying to run a jar file - let's call it test.jar - that uses the Sybase jconn3.jar on a Unix system. I have created a MANIFEST.MF file that has the following: Class-Path: $SYBASE/jConnect-6_0/classes/jconn3.jar commons-net-1.3.0.jar This gives a ClassNotFoundError. $SYBASE is the system variable that points to /o...

How to obfuscate an OSGi bundle with ProGuard?

Hi all! I am currently trying to obfuscate my Eclipse RCP application with ProGuard. The problem is that it obfuscates the package names (the class My.Package.Class turns into something like a.b.c), but keeps the package names in the Export-Package section of MANIFEST.MF. This leads to the fact that my application (which is a set of OSG...

Apache ant manifest class-path ?

I have a standard project layout for a java project: project / src / source_file_1.java ... source_file_N.java build / classes / source_file_X.class ... jar / MyJar.jar lib / SomeLibrary.jar SomeOtherLibrary.jar As far...

Tomcat cant pick class-path from Manifest file

Tomcat Version :5.0.28 JDK: 1.5.0.14 The problem: I am using both hibernate and struts We are not on the latest and greatest of the version for these libraries So- both need a different version of apache-commons library. The solution I have in mind: Use manifest file and specify a different version of apache-commons for each My web ...

Using tools that the JDK and/or JRE provide, is there a way to view the Manifest file for a given JAR?

I'm able to read the Manifest file inside of my Java code, but I would also like to know if it's possible, and if it is, how to open up a JAR file from the command line and view its Manifest.MF file, or at the very least be able to specify a property of the Manifest.MF file and view it's value. ...

Netbeans manifest

Hi there, Is it possible to add entries to the manifest.mf file of jars generated by netbeans? to build an osgi bundle for instance. ...

mangen adds 'Bundle-ManifestVersion: 1' to manifest, but felix doesn't seem to accept value 1

Hi, I've used 'Mangen' to process my jar, which works but it adds the next line to the manifest Bundle-ManifestVersion: 1 after which Felix 1.8.0 complains with -> install file:D:/bundles/osgi_ds_1.jar.new.jar org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value: 1 at org.apache.felix.framework.util.ma...

Can I call class files that are within a jar library located in another jar file?

I am trying to access the class files packaged as a library but unfortunately the jar libraries should be packaged in another jar file. As an example say I have a.jar that contains some class libraries. I can call (import) the classes in the jar file from my external java application. Now I need to put this a.jar inside another jar say...

Need to read own Jar's manifest, and not root-classloaders' manifest

Hi, i need to read the Manifest file, which delivered my class. but it seems that when i use getClass().getClassLoader().getResources(...) i end up getting the MANIFEST from the first Jar loaded into the Java Runtime. My app will be running from applet or webstart, so i will not have access to my own .jar file i guess i actually w...

Netbeans: How do I let additional files be included into the created JAR?

Hello! Netbeans doesn't allow me to specify, which files I want to have additionally included inside the JAR. Can I work this around by editing the manifest.mf? Or by editing build.xml? What else could be done? EDIT I need the files to appear in jar's root (files such as LICENSE.txt or some exec script), because otherwise they would...

Is it possible to add a custom manifest to a Java library compiled in Netbeans 6.7.1?

I tried adding manifest.file=${src.dir}/manifest.mf to project.properties, but looking through the build-impl.xml I see that the manifest.available is usually accompanied by main.class condition, so it makes me believe that my manifest would be added only if the package has a main class, which mine, being a library, does not have. No mat...

How to include the lib folder in the manifest classpath in Netbeans

Hi, A library that my java application uses needs looks for a file (log4j.xml) in the class path. I use netbeans to manage my project, but I can't find a way to include the lib/ folder. Netbeans automatically creates a MANIFEST.MF file inside the application jar and also creates a folder called lib/ which includes all dependencies. Thi...

Bundling native dll with jar

Hi, I need to include native lib (jnotify but I think that it does't matter) to my jar. I wont to do it with NetBeans. I added Bundle-NativeCode: /lib/jnotify.dll; osname=win32 to my manifest.mf file and added jnotify.dll to projektHome\src\lib\ folder. But unfortunately NetBeans is overidning manifest.mf file. How can I fixed? Can I ...

How to specify the jar file in manifest ?

I have created a mail.jar file and mywar.war file. What I need to set into the manifest.mf use the mail.jar as a library? ...

How to Create a runnable jar that uses external jar files in dynamic locations.

Hi, I've programmed an application that take about 300 kilobytes. The jar files that it uses (library) take about 10 megz. These library jar files are used in other applications I wrote and so I would like to have them located in an external central location (Meaning - A path on some hard drive in the same computer). Hopefully, the pat...

include external jar when running java -jar

From my readings, when you execute a command as follows: java -jar foo.jar Then the main classpath is ignored and the classpath is taken from the manifest file. Further, the classpath declared on the command line is also ignored. So in: java -classpath /usr/local/jar/foobar.jar -jar foo.jar /usr/local/jar/foobar.jar is ignored. ...

How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ?

How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ? I have an open-source project that I am converting from Ant to Maven, including its unit tests. Here's the project source repository with the Maven project: http://github.com/znerd/logdoc My question pertains to the primary module, called "base". Thi...

Java - edit manifest.mf to have .class and .java files in a JAR

Hello, I would like to have .class and .java files in a JAR. Thus, I have "bin" and "src" pastes in that JAR. How should I edit the MANIFEST.MF? JAR | -- bin -- .class files | -- src -- .java files | -- META-INF -- MANIFEST.FM Im doing this: Manifest-Version: 1.0 Class-Path: ./bin/ Main-Class: simul.Simulador But with n...

manifest.mf is overwritten by ecplise during jar export

Hello guys, I would like make an executable jar archive with eclipse. So into my project I created file src/META-INF/MANIFEST.MF : Manifest-Version: 1.0 Main-Class: MainClass Class-Path: . But when I export my java eclipse project eclipse warn me with following message: "JAR export finished with warnings. See details for additional...