Hi

I have a three folders i have compressed all the folders using jar. I want to access one of the java file inside jar file that is actually inside one of the folders to start the application. 

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.

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.

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.