Results 1 to 4 of 4
  1. #1
    Cynot is offline Member
    Join Date
    May 2010
    Posts
    9
    Rep Power
    0

    Default Weird problem with distributing .jar

    I posted this in another forum but was told to move the subject here.

    ----
    I've created a small java application in Netbeans as a "proof of concept" to see if I could do something before proposing it to a client, but I'm running into a weird error.

    I can compile a good .jar file that runs perfectly, and I can copy the "dist" folder anywhere and it works. However, if I package it with an installer (Astrum Install Wizard) and run the unpackaged .jar, it fails to run (the command line gives me a couple "NullPointerException" errors).

    However (this is what confuses me), if I take the same "dist" folder as created by my installer, and copy it to my desktop, the .jar runs fine.

    I'm not sure if this is the right forum (moderators feel free to move this thread if so), but what is causing this? The same file that is unzipped by the Install Wizard works fine if I do a "copy + paste" somewhere else (its not the location, I've tried installing it in a couple different places) it just doesn't like to work if I use the wizard.

  2. #2
    HerrK. is offline Member
    Join Date
    Jun 2010
    Location
    Berlin
    Posts
    22
    Rep Power
    0

    Default

    Well, maybe it would be useful to have some more details.

    You mention the "dist" folder, but not the content. So what is inside the dist folder and what do you mean by "run" the application. How is this done in either case?

    If the application is not top secret, maybe you could attach it to the post, so that anyone could have a closer look to the jar file that is not able to run. And of course the error messages might contain some usefull information, too.

    Best regards,
    Herr K.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,755
    Rep Power
    19

    Default

    The "dist" folder is presumably the one produced by Netbeans when it packages up an app, so it contains the applications jar, and a lib (usually) directory containing any dependencies.

    Since the app works when the dist directory is copied over, I would look into what it is that the installer is doing. Possibly its installation location?

  4. #4
    Cynot is offline Member
    Join Date
    May 2010
    Posts
    9
    Rep Power
    0

    Default

    Tolls is correct. The distribution folder I'm talking about is the one as generated by Netbeans.

    Here is a link to a .zip file containing the "dist" folder and the installer as per HerrK's request. Google Docs

    I've been installing the application in various locations, and the files work just fine if I copy/paste the folder generated from the installer anywhere else...so I'm really very confused as to why this would happen.

Similar Threads

  1. Weird problem with distributing .jar
    By Cynot in forum New To Java
    Replies: 4
    Last Post: 06-07-2010, 12:03 PM
  2. Weird problem with JSTL
    By Diego_Dalmasso in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-02-2010, 02:51 PM
  3. weird problem
    By GPB in forum New To Java
    Replies: 2
    Last Post: 02-28-2010, 12:04 PM
  4. Weird msdos problem
    By dudejonne in forum New To Java
    Replies: 6
    Last Post: 11-02-2009, 08:39 PM
  5. code migration problem in distributing system
    By sushil in forum AWT / Swing
    Replies: 2
    Last Post: 10-29-2009, 01:34 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
  •