Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27
  1. #21
    nat
    nat is offline Member
    Join Date
    Dec 2013
    Posts
    56
    Rep Power
    0

    Default Re: .jar file is not working on a machine with no installed java developing environme

    OK, I will try to run the jar from a short named directory, and will post the result. Thanks

  2. #22
    nat
    nat is offline Member
    Join Date
    Dec 2013
    Posts
    56
    Rep Power
    0

    Default Re: .jar file is not working on a machine with no installed java developing environme

    This is what I get when I copied the jar file on c:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\laptopAOP>java -jar nameofthejar.jar
    Exception in thread "main" java.util.zip.ZipException: The system cannot find th
    e file specified
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)

    C:\Documents and Settings\laptopAOP>

  3. #23
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,021
    Rep Power
    6

    Default Re: .jar file is not working on a machine with no installed java developing environme

    Quote Originally Posted by Norm View Post
    That is a very old version of java. Older versions of java do NOT work with code generated for the current version of java.
    (unless you make it produce classes compatible with that older version)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #24
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,010
    Rep Power
    20

    Default Re: .jar file is not working on a machine with no installed java developing environme

    Quote Originally Posted by nat View Post
    This is what I get when I copied the jar file on c:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\laptopAOP>java -jar nameofthejar.jar
    Exception in thread "main" java.util.zip.ZipException: The system cannot find th
    e file specified
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)

    C:\Documents and Settings\laptopAOP>
    That is not the C:\ directory.
    It is still in Documents and Settings.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #25
    nat
    nat is offline Member
    Join Date
    Dec 2013
    Posts
    56
    Rep Power
    0

    Default Re: .jar file is not working on a machine with no installed java developing environme

    I put one copy of the file on the c:\ directory, but left the zip file on the old location. Should I put the zip file on C:\ directory?

  6. #26
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,010
    Rep Power
    20

    Default Re: .jar file is not working on a machine with no installed java developing environme

    Are we talking about the jar file here?

    You put the jar file in a top level directory (I would make a jar directory), along with whatever dependency structure it has.
    Then run that jar file from that directory.

    Or (frankly) update the JRE on that machine.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #27
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,412
    Rep Power
    25

    Default Re: .jar file is not working on a machine with no installed java developing environme

    left the zip file on the old location.
    What does the zip file have to do with executing the program in the jar file?
    If you don't understand my response, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: 06-04-2013, 11:52 AM
  2. Replies: 10
    Last Post: 02-28-2012, 08:44 PM
  3. Replies: 0
    Last Post: 12-21-2011, 09:15 AM
  4. Replies: 1
    Last Post: 07-28-2011, 07:50 PM
  5. Replies: 0
    Last Post: 02-07-2011, 01:27 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
  •