Results 1 to 14 of 14
  1. #1
    lamiajoyee is offline Member
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Default Java Virtual Machine Launcher problem

    hello i want to open a jar file.but whenever i try to do it i get this message:
    Java Virtual Machine Launcher
    A Java Exception has occurred.
    what can i do? i have both jre and jdk installed

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    Have you tried using the java -jar command in a command prompt to see if you get more information?

  3. #3
    perfect5085 is offline Member
    Join Date
    Aug 2011
    Location
    HangZhou, China
    Posts
    4
    Rep Power
    0

    Default

    Opening a jar file does not have anything with JVM.
    Do you want to execute a jar file? Please post the error message.

  4. #4
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    Hey, I have this same problem. I sent my freshly compiled program to my buddy on win7 after trying to open it myself to see if it works on his pc. It didn't work on my girlfriends either. He told me he had this same message box pop up


    the window header is Java Virtual Machine Launcher
    a java exception has occured


    For me and my girlfriend 'on Vista' we get the cmd prompt for a split second.
    There is this error in Eclipes. The serializable class VR does not declare a static final serialVersionUID field of type long.
    After I spent a really long time looking for ways to fix this I couldn't. I also saw on some threads which say to ignore it so I decided to post for help here.

    Thanks!

    I am quite new to this.
    Last edited by xtre; 01-15-2012 at 12:42 AM.

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Java Virtual Machine Launcher problem

    Can you get the full text of the error message and post it here.
    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.

  6. #6
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    I double clicked the .jar file I compiled using Eclipes and the command prompt just opens and closes, displaying nothing. Same for anything else I make.
    After doing java -jar SomeSimpleThing.jar it just says this:
    Error: Invalid or corrupt jarfile SomeSampleThing.jar
    Last edited by xtre; 01-15-2012 at 01:25 AM. Reason: Sorry, Missed out the -jar

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Java Virtual Machine Launcher problem

    Error: Invalid or corrupt jarfile
    Has this jar file every worked?
    Try opening it in a zip file utility to see if the contents are displayable and readable.

  8. #8
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    Yeah, everything looks like it should.
    It runs fine in Eclipes but doesn't when I export it and click the .jar
    I'll continue to troubleshoot and post if I get it working.

  9. #9
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Java Virtual Machine Launcher problem

    Can you copy the contents of the command prompt window from when you execute the java -jar command and post it here

  10. #10
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\Users\JIM>java -jar SomeSampleThing.jar
    no main manifest attribute, in SomeSampleThing.jar

    C:\Users\JIM>java -jar SomeSampleThing.jar
    no main manifest attribute, in SomeSampleThing.jar

    C:\Users\JIM>

  11. #11
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    Java Code:
    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
    
    C:\Users\JIM>java -jar SomeSampleThing.jar
    no main manifest attribute, in SomeSampleThing.jar
    
    C:\Users\JIM>java -jar SomeSampleThing.jar
    no main manifest attribute, in SomeSampleThing.jar
    
    C:\Users\JIM>java -jar
    Error: -jar requires jar file specification
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar jarfile [args...]
               (to execute a jar file)
    where options include:
        -d32          use a 32-bit data model if available
        -d64          use a 64-bit data model if available
        -client       to select the "client" VM
        -server       to select the "server" VM
        -hotspot      is a synonym for the "client" VM  [deprecated]
                      The default VM is client.
    
        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A ; separated list of directories, JAR archives,
                      and ZIP archives to search for class files.
        -D<name>=<value>
                      set a system property
        -verbose[:class|gc|jni]
                      enable verbose output
        -version      print product version and exit
        -version:<value>
                      require the specified version to run
        -showversion  print product version and continue
        -jre-restrict-search | -no-jre-restrict-search
                      include/exclude user private JREs in the version search
        -? -help      print this help message
        -X            print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
                      enable assertions with specified granularity
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
                      disable assertions with specified granularity
        -esa | -enablesystemassertions
                      enable system assertions
        -dsa | -disablesystemassertions
                      disable system assertions
        -agentlib:<libname>[=<options>]
                      load native agent library <libname>, e.g. -agentlib:hprof
                      see also, -agentlib:jdwp=help and -agentlib:hprof=help
        -agentpath:<pathname>[=<options>]
                      load native agent library by full pathname
        -javaagent:<jarpath>[=<options>]
                      load Java programming language agent, see java.lang.instrument
    
        -splash:<imagepath>
                      show splash screen with specified image
    See http://www.oracle.com/technetwork/java/javase/documentation/index.html for m
    ore details.
    
    C:\Users\JIM>

  12. #12
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Java Virtual Machine Launcher problem

    no main manifest attribute, in SomeSampleThing.jar
    Does your jar file have a correct manifest file?

  13. #13
    xtre is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: Java Virtual Machine Launcher problem

    It should. I compiled it again with Eclipes, then overwrite the previous .jar file and then ran it using cmd prompt.
    If not how would I tell? It says inside the manifest file: Manifest-Version: 1.0

  14. #14
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Java Virtual Machine Launcher problem

    then ran it using cmd prompt.
    If it ran then I don't understand what your problem is.

Similar Threads

  1. Writing a virtual machine in Java
    By Jarob22 in forum Advanced Java
    Replies: 5
    Last Post: 06-02-2011, 12:52 AM
  2. Could not create Java Virtual Machine
    By cr6 in forum New To Java
    Replies: 0
    Last Post: 02-16-2011, 10:40 PM
  3. calling java virtual machine
    By many in forum New To Java
    Replies: 5
    Last Post: 12-01-2008, 10:06 PM
  4. Virtual machine of java.
    By Albert in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 08:48 PM
  5. C# Java Virtual Machine 1.0.1
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-25-2007, 07:47 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
  •