Results 1 to 2 of 2
  1. #1
    Stoneyhrm is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Cannot Open .jar File ...

    It seems like I've tried everything. Everytime I make a program using Eclipse and try to export it is as .jar and open it, it just proceeds to load for a second and show nothing then exit.

    I went to cmd and did 'java jar -udp.java' (program is a udp socket-send test)
    and it says "no main manifest attribute in Test.jar' (project name is Test).

    Now I know what this means so I added a MANIFEST file. I know eclipse creates a manifest.mf file in 'META-INF' that reads:
    Manifest-Version: 1.0
    Rsrc-Class-Path: ./
    Class-Path: .
    Rsrc-Main-Class: UDP
    Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoa der

    and I tried saving my own as both manifest.mf/manifest.txt. Everytime I get this same error from command prompt.

    Is there anything I'm doing wrong? I can compile and run programs with command prompt using commands, but have never succeeded in creating a .jar file.

    Thanks for any help. This is so stressful.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,443
    Rep Power
    25

    Default Re: Cannot Open .jar File ...

    Does the manifest file have a newline character and the end of the last line in the file?

Similar Threads

  1. Replies: 15
    Last Post: 02-16-2012, 03:43 PM
  2. I/O How to open a file
    By sehudson in forum New To Java
    Replies: 8
    Last Post: 07-18-2011, 03:32 AM
  3. Replies: 0
    Last Post: 03-05-2010, 04:21 AM
  4. Different Files Open in File -> Open Workspace
    By mgm2010 in forum JCreator
    Replies: 0
    Last Post: 04-11-2009, 02:14 PM
  5. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 09:57 AM

Posting Permissions

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