Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Running a jar in a batch file

    placed one try.jar file on desktop and another in try.jar in C:\Users\Trynys
    The way the program is written, it requires the Bulve.jpg file to be in the same folder with the jar file.
    So every place you copy the jar file, you must also put the Bulve.jpg file.

    The program should be rewritten to use resources so that all required files are contained in the jar file and not copied with the jar file.
    See the Class class's methods that get resources from the contents of the jar file.
    If you don't understand my response, don't ignore it, ask a question.

  2. #22
    asdfg is offline Senior Member
    Join Date
    Nov 2016
    Rep Power

    Default Re: Running a jar in a batch file

    Perhaps I was meant wrong. I wanted to know, how to make a code excutable outside eclipse. I mean: double click on that file - program runs.

  3. #23
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Problem running jar file

    (Moved this to its own thread, as it wasn't related at all to the one it was posted in).

    Norm is saying that your resources (in this case an image) should be part of the jar file, and should be retrieved using the getResource methods.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Page 2 of 2 FirstFirst 12

Similar Threads

  1. problem running compiled class file
    By SnakeDoc in forum New To Java
    Replies: 6
    Last Post: 04-14-2012, 01:54 AM
  2. Replies: 7
    Last Post: 12-18-2011, 05:13 AM
  3. Weird problem running a batch file
    By d3n1s in forum Advanced Java
    Replies: 7
    Last Post: 06-19-2011, 02:34 AM
  4. Running jar file.
    By yogi1410 in forum Advanced Java
    Replies: 1
    Last Post: 01-11-2010, 11:59 AM
  5. Replies: 0
    Last Post: 08-26-2009, 02:03 PM

Posting Permissions

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