Class-Path not getting write to MANIFEST.MF file on jar creation

androidGenX

I need to create a jar file I did the steps as follows:

C:\TIPL\GCST>javac -classpath lib/xbasej-20091203.jar Test.java

C:\TIPL\GCST>jar cfm MyJar.jar manifest.txt Test.class

My manifest.txt file as follows:

Main-Class: Test 
Class-Path: commons-logging-1.1.1.jar xbasej-20091203.jar

My Test.java as follows:

import org.xBaseJ.DBF; 

public class Test 
{ 
public static void main(String args[]){ 

try{ 

//Open dbf file 
DBF classDB=new DBF("Class.dbf"); 
System.out.println("here"); 
} 
catch(Exception e){ 
} 

} 
}

I am getting created the jar file , but when I extract it and inside my Manifet.MF file it looks like this:

Manifest-Version: 1.0
Created-By: 1.8.0_25 (Oracle Corporation)
Main-Class: Test 

It is not getting the class-path append to it. Due to this when I run my jar file I am getting errors? How can I solve this? What is the reason the classpath not getting append on MANIFEST.MF

androidGenX

In manifest text after putting your contents you must put an extra space into it. So Do an Enter after adding all contents in manifest.txt

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Exclude class path reference from MANIFEST.MF file

From Java

Replacing the MANIFEST.MF file in a JAR programmatically

From Dev

What is the proper way to parse the entries of a manifest.mf file in jar?

From Dev

How to set Class-Path in MANIFEST.MF to custom classpath?

From Java

What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

From Dev

What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

From Dev

JAR manifest Class-Path, use folder instead of jar

From Dev

Java 'Could not find main class' for .jar even though its written in manifest.mf

From Dev

Java 'Could not find main class' for .jar even though its written in manifest.mf

From Java

Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar)

From Dev

Invalid main class for MANIFEST.MF Tomcat

From Dev

NoClassDefFoundError even though the JAR's are included in Manifest Class-Path

From Java

Wrong Manifest.mf in IntelliJ IDEA created .jar

From Dev

spring-boot-devtools fails on JAR with missing MANIFEST.MF

From Dev

Specify Manifest.MF during test - Fat / Shaded JAR

From Dev

Programmatically read Manifest.MF from JAR in an EAR

From Dev

Specify Manifest.MF during test - Fat / Shaded JAR

From Dev

spring-boot-devtools fails on JAR with missing MANIFEST.MF

From Dev

Open Source Jar file and Failed to load Main-Class manifest

From Dev

Getting an executable jar file to run after creation from netbeans

From Dev

How to read manifest.mf from *.war/META-INF/MANIFEST.MF file?

From Dev

How to add Class-Path to the manifest file with maven

From Dev

Warnings in .jar file creation

From Dev

What is the use of MANIFEST.MF file in Dynamic web project in Eclipse

From Dev

Grep Exported-Packages from a MANIFEST.MF file

From Dev

Reading Manifest.mf in war file using java

From Dev

How to load a whole directory using Class-Path: jar manifest header?

From Dev

Does jar manifest support `Class-Path`? Why use spring-boot-loader instead?

From Dev

Confusion on Uses of Jar Manifest File

Related Related

  1. 1

    Exclude class path reference from MANIFEST.MF file

  2. 2

    Replacing the MANIFEST.MF file in a JAR programmatically

  3. 3

    What is the proper way to parse the entries of a manifest.mf file in jar?

  4. 4

    How to set Class-Path in MANIFEST.MF to custom classpath?

  5. 5

    What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

  6. 6

    What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?

  7. 7

    JAR manifest Class-Path, use folder instead of jar

  8. 8

    Java 'Could not find main class' for .jar even though its written in manifest.mf

  9. 9

    Java 'Could not find main class' for .jar even though its written in manifest.mf

  10. 10

    Gradle duplicate entry error: META-INF/MANIFEST.MF (Or how to delete a file from jar)

  11. 11

    Invalid main class for MANIFEST.MF Tomcat

  12. 12

    NoClassDefFoundError even though the JAR's are included in Manifest Class-Path

  13. 13

    Wrong Manifest.mf in IntelliJ IDEA created .jar

  14. 14

    spring-boot-devtools fails on JAR with missing MANIFEST.MF

  15. 15

    Specify Manifest.MF during test - Fat / Shaded JAR

  16. 16

    Programmatically read Manifest.MF from JAR in an EAR

  17. 17

    Specify Manifest.MF during test - Fat / Shaded JAR

  18. 18

    spring-boot-devtools fails on JAR with missing MANIFEST.MF

  19. 19

    Open Source Jar file and Failed to load Main-Class manifest

  20. 20

    Getting an executable jar file to run after creation from netbeans

  21. 21

    How to read manifest.mf from *.war/META-INF/MANIFEST.MF file?

  22. 22

    How to add Class-Path to the manifest file with maven

  23. 23

    Warnings in .jar file creation

  24. 24

    What is the use of MANIFEST.MF file in Dynamic web project in Eclipse

  25. 25

    Grep Exported-Packages from a MANIFEST.MF file

  26. 26

    Reading Manifest.mf in war file using java

  27. 27

    How to load a whole directory using Class-Path: jar manifest header?

  28. 28

    Does jar manifest support `Class-Path`? Why use spring-boot-loader instead?

  29. 29

    Confusion on Uses of Jar Manifest File

HotTag

Archive