CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    1

    [Eclipse] Creating Runnable JAR file

    Hellow
    I have some problem with creating runnable JAR file in Eclipse. I made a class which use JMF library and I added this library in Eclipse (Build Path -> Configure Build Path -> Libraries -> Add External JARs -> and I pointed out locations of the required libraries (JMF.jar). When I compile and run my application in Eclipse everything is working properly and my problems start when I want to make a JAR file.

    I was searching in internet and couldn't find the solution of my probleme.

    I create a JAR file following by this steps: Export -> Runnable JAR file. The JAR is created but when I double click on it to opent it there is nothing happens. I tried to run it of the console (java -jar MYJARFILE.jar) and I get the following message:
    Code:
    Exception in thread "main" java.util.NoSuchElementException
            at java.util.Vector.firstElement(Unknown Source)
            at VideoTransmisja.<init>(VideoTransmisja.java:62)
            at VideoTransmisja.main(VideoTransmisja.java:349)
    It seams to be a problem with using JMF library.



    Next I tried to create by: Export -> JAR file in two ways "generate the manifest file" and "use existing manifest from workspace" and the problem was the same :/

    my manifest file:
    Code:
    Manifest-Version: 1.0
    Class-Path: jmf.jar
    Main-Class: VideoTransmisja
    Could someone help me please? I was trying to solve this probleme whole day

    I don't know if I correclty create my manifest file and if I could add jar library to creating jar file?

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: [Eclipse] Creating Runnable JAR file

    I create a JAR file following by this steps: Export -> Runnable JAR file. The JAR is created but when I double click on it to opent it there is nothing happens.
    Did you remember to select the radio button to package all required jars into your runnable jar?

    Next I tried to create by: Export -> JAR file in two ways "generate the manifest file" and "use existing manifest from workspace" and the problem was the same :/
    If using your own manifest approach the JMF.jar must be on the in the same directory as your jar.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured