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

    Question Weird problem with distributing .jar

    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. :confused:

    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
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Not familiar with Netbeans. I've only worked with the javac, jar and java commands.

    What is the relationship between the dist folder and the jar file containing the app?

    This sounds like an IDE problem not a java programming problem.

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

    Default

    When you use the "Clean and build" function in Netbeans, it compiles everything into .jar files and stores them in a folder labeled "dist". According to the documentation in order to distribute your java application you need only distribute the "dist" folder and its contents.

    This all works correctly. I only run into an error when I use the install wizard to copy the files, which leads me to believe the issue is with the integration of the installer.

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

    Default

    Better ask this on a Netbeans forum.

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,800
    Rep Power
    19

    Default

    Or a forum for the installer stuff...(see your other thread).

Similar Threads

  1. Weird download file problem
    By bubbless in forum Advanced Java
    Replies: 12
    Last Post: 05-28-2010, 03:14 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
  •