Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the Class-Path in the MANIFEST.MF can only include jar Files?

I want to include class files in other directories, not the directory of the main class.

If I put these directories into the Class-Path property of MANIFEST.MF it doesn't work.

Why? Is there any solution except packing these classes into a jar File?

like image 689
scobur Avatar asked Nov 25 '12 05:11

scobur


People also ask

What is class path in manifest MF?

By using the Class-Path header in the manifest, you can avoid having to specify a long -classpath flag when invoking Java to run your application. Note: The Class-Path header points to classes or JAR files on the local network, not JAR files within the JAR file or classes accessible over Internet protocols.

What is manifest MF in JAR?

The manifest is a special file that can contain information about the files packaged in a JAR file. By tailoring this "meta" information that the manifest contains, you enable the JAR file to serve a variety of purposes.

How do I find the classpath of a JAR file?

To check our CLASSPATH on Windows we can open a command prompt and type echo %CLASSPATH%. To check it on a Mac you need to open a terminal and type echo $CLASSPATH.


1 Answers

A trailing slash would be required as mentioned in this link:

Class-Path Attribute

like image 55
James Jithin Avatar answered Oct 18 '22 23:10

James Jithin