Areint 0 Newbie Poster

Hello,

I'm having some problems creating an executable jar. I have written all my code in Eclipse and am able to run the program in it, but I cannot create a jar that runs it successfully and I cannot use Eclipse to export a jar that does it either.

Here is my working directory structure:

  • Knowl-Trunk
    • bin
      • gen
      • images
      • sources
      • temp
      • test
      • util
        • indexer
    • src
      • gen
      • images
      • sources
      • temp
      • test
      • util
        • indexer

The bin directory contains all the compiled .class files and the src contains all the .java files. What I need to run the part of the program I am trying to compile into jar is contained in the util, util\indexer, and sources folders.

I've tried numerous ways to get the jar to work correctly, but haven't been able to yet. It runs, but not everything is displayed (see pictures).

From the bin directory I've tried this command: jar cvfm out.jar Manifest.txt sources util using this Manifest.txt: Main-Class: util.testlaunch This is how I produced the results in the first picture (this is also the result produced when using the Export option in Eclipse). The second picture is the results I would like, and what I get when I use Eclipse to run the program.

I have no clue why I am not able to create the jar, any help would be greatly appreciated.


EDIT

I forgot to mention this earlier. When using the jar command and manifest included above to get the results in the first picutre, if I move that jar to the root directory it runs perfectly fine.

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.