Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Runnable jar file wont run

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Runnable jar file wont run

    I have made my game i coded into a runnable jar file using eclipse however when i try and run it from the desktop it does nothing i have tried to fix it but so far no luck and ideas

    thanks


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Runnable jar file wont run

    See if there are error messages:
    Open a command prompt window and entry:
    java -jar THEJARFILENAME.jar

    copy the full contents of the window and paste here.

    On windows: 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.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Runnable jar file wont run

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Greg>java -jar DisplayScreen.jar
    Error: Unable to access jarfile DisplayScreen.jar

    C:\Users\Greg>


    im probably being dopy but if you can help then thanks as i am new to programming

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Runnable jar file wont run

    You need to be in the folder with the jar file. Change the directory or copy the jar file to the Greg folder.
    The java command did not find the jar file.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Runnable jar file wont run

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Greg>java -jar FreedomTD.jar
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.libr
    ary.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at org.lwjgl.Sys$1.run(Sys.java:73)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
    at org.lwjgl.Sys.loadLibrary(Sys.java:95)
    at org.lwjgl.Sys.<clinit>(Sys.java:112)
    at org.lwjgl.opengl.Display.<clinit>(Display.java:132 )
    at Main.DisplayScreen.CreateWindow(DisplayScreen.java :33)
    at Main.DisplayScreen.Start(DisplayScreen.java:22)
    at Main.DisplayScreen.main(DisplayScreen.java:251)

    C:\Users\Greg>

    this is what i got this time

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Runnable jar file wont run

    java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
    Looks like you are missing some parts. See the API doc for the class: UnsatisfiedLinkError

    I'm not familiar with lwjgl. Read its API doc to see where you need to place the parts it uses during execution.

    Do a google with java.library.path for info on the problem and its solution.
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Feb 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This problem relates to the natives setup within the project. i'm having the same problem. As soon as I have a fix I'll let you know... Though its damn frustrating!!

Similar Threads

  1. run jar file inside a jar file?
    By ufrubnuckle in forum Java Theory & Questions
    Replies: 1
    Last Post: February 21st, 2013, 06:58 AM
  2. I cant export my applet into a runnable jar file
    By Shef012 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 7th, 2013, 02:08 PM
  3. Exporting Runnable JAR File
    By cr80expert5 in forum Object Oriented Programming
    Replies: 3
    Last Post: January 26th, 2012, 09:35 PM
  4. creating runnable JAR file
    By olimpicco in forum Java IDEs
    Replies: 25
    Last Post: January 11th, 2012, 09:15 AM
  5. Image location on a Runnable JAR file?
    By DarrenReeder in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 11th, 2010, 07:59 AM