2
Contributors
3
Replies
16
Views
4 Years
Discussion Span
Last Post by JamesCherrill
0

You specify that class that has the main method in the Main-Class entry in your manifest file. The class name should be fully qualified with its containing package structure, and that must match the folder structure in your jar.

0

Suppose i have jar A inside a folder B inside the jar i have a class C with main method. Now i have compressed the folder A inside jar D. What should i have to write in the main class entry of jar D's manifest file.

0

Let's assume that you meant "compressed the folder B" ?
I've never seen a jar compressed inside a jar like that, so I don't know if its even possible for the JRE to understand that format. If it does work, then the inplication is that your package structure containing C must be like D.B.A, ie

package D.B.A;
public class C {
    public static void main...

and the manifest entry should be

Main-Class: D.B.A.C
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.