Results 1 to 5 of 5

Thread: Java classpath jar file error

  1. #1
    Join Date
    Sep 2010
    Posts
    12

    Java classpath jar file error

    I have a java project, the goal is to create an executable jar, in order to execute the command line. I followed the tutorial found on the net, I create my JAR pointing the hand of my class. This project uses many Java JAR external, first time I have also included these external JAR overall project. The goal is to then take the JAR and can run on any workstation. Here is my command line:
    java-jar CIX.JAR D: \ Projects \ CIX \ var \ jamming_params.xml D: \ Projects \ CIX \ var \ 0000128_OUT_REJ
    D: \ Projects \ CIX \ var \ out
    The main function of JAR has 3 arguments. Yet I have this error message;
    Failed to load Main-Class manifest attribute from jar file
    I researched on the net, as I said to add the classpath associated with different external JARs used, I do not see the point because when creating the JAR, I included the external JAR. I am a bit lost!! Please help me as soon as you can.

  2. #2
    Join Date
    Feb 2010
    Posts
    125

    Re: Java classpath jar file error

    If you use the IDE eclipse, there is the Fat Jar Eclipse Plug-In that will do this for you. It's much more complicated than it seems to include jar upon which your project within the jar in your application. Fat Jar Eclipse Plug-In (fjep): add Eclipse Export Wizard, add one of the Java projects, along with all the libraries in a single executable JAR file along packs. You can also use Eclipse plug-in for testing of expressions to the XML query language XPath. Also supports for writing regular expressions and generates appropriate code in C # and VB.NET; provides syntax highlighting, search and import functions for regexlib.com and graphical analysis of all matches; has Snippet storage for frequently used expressions.

  3. #3
    Join Date
    Feb 2010
    Posts
    531

    Re: Java classpath jar file error

    In theory, the jar libraries are meant to be shared by all java programs. They are expected to be deployed in the lib folder of the installation of the jre. Thus, you do not 10 versions of the same library on disk, and it is easier to manage updates. After practice, we realize that most programs java deploy their own jar in the installation folder of the program (which is easier, of course, but goes against the principle of shared library). Put everything in a jar ... it's worse if you put your updated jar principal, you are obliged to send all the jars with your application depends on each update, whereas if you deploy them in a separate folder, you do that 'to send the jar in your application. After it is up to you the solution you want to keep.

  4. #4
    Join Date
    Sep 2010
    Posts
    12

    Re: Java classpath jar file error

    Thank you for your advice!! So I create a JAR that contains only my source code. I put in the jre lib directory of the JAR that my dependent project. I am trying to re-run my jar and I have the same error!! I do not know how to have when running the JAR, this one points to the JAR external JRE directory. Can be in the classpath!? I tried following command:
    java-classpath CIX.jar .... (With the arguments that must be!)
    I tried putting in my CLASSPATH system variable that points to the lib folder of the JRE, but it does not work. Please keep helping on forward.

  5. #5
    Join Date
    Apr 2009
    Posts
    40

    Re: Java classpath jar file error

    The error means it can not find the class BootStrapException net.atos.mm.fwk.bootsrap package which is certainly used for the first time on line 1074 of your class AccountNumberJamming in the main function. Assures you that the jar of this library is indeed in the records that you defined in your classpath. Personally, I prefer to set the classpath when launching the jar with a bat file for example (java-classpath =... tonjar.jar) and you do not depend on a system variable that can be changed by mistake.

Similar Threads

  1. Replies: 10
    Last Post: 09-01-2012, 07:48 AM
  2. Reading an XML file in Java
    By Chetna in forum Software Development
    Replies: 7
    Last Post: 13-07-2011, 04:31 PM
  3. Replies: 3
    Last Post: 28-01-2011, 06:26 AM
  4. Error in Java file: Cannot find symbol
    By Jayden in forum Software Development
    Replies: 5
    Last Post: 02-09-2009, 08:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,617,616.86577 seconds with 17 queries