Results 1 to 10 of 10
  1. #1
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Default Netbeans 6.5 - java -jar "Assessment3Bmi.jar"

    Can someone tell me why when I try to run through the command promt with the information from the README.txt that the app wont work, it gives me errors

    Exception in thread "main" java.lang.NullPointerException

    at assessment3Bmi.frmBmi.<init><frmBmi.java:62>

    at assessment3Bmi.Main.main<Main.java:19>

    Can someone interpret this for me please?

    The application runs fine through netbeans, no errors so what is the cmd telling me?


    Thanks in advance.

  2. #2
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    can't tell you much with such little information. all i can say is that in your file frmBmi.java on line 62, operations are being performed on something that is null. that is what a null pointer exception is. you should learn to understand what the compiler's messages mean. you'll become familiar with common mistakes and will almost always be able to spot the location where something is awry.

  3. #3
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Default

    But why is it running fine through netbeans if there was an issue surely netbeans would have advised me of this?

    The error message above is all the information that it gives me, what further information would help, I can put the code in??

  4. #4
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    well, how are you running it? what is the actual command you use?

  5. #5
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Default

    After getting to the correct directory I used as in the Readme

    To run the project from the command line, go to the dist folder and
    type the following:

    java -jar "Assessment3Bmi.jar"

  6. #6
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Default

    Thats what I used

    To run the project from the command line, go to the dist folder and
    type the following:

    java -jar "Assessment3Bmi.jar"

  7. #7
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Default

    Has anyone got any ideas?

    :confused:

  8. #8
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

    Question

    After reading

    http://java.sun.com/j2se/1.3/docs/gu...jar.html#Intro

    and reading the README.txt within the package that I am trying to run in the command window I tried

    java -jar "Assessment3Bmi.jar"
    I got 'Unable to access jar file Assessment3Bmi.jar'

    Can someone tell me where I am going wrong?

    Thanks in advance

  9. #9
    Natrix is offline Member
    Join Date
    Mar 2009
    Posts
    40
    Rep Power
    0

    Default

    Why not unpack the jar archive and then run it?
    If that is possible. Dont know, just a noob here.

  10. #10
    dbashby's Avatar
    dbashby is offline Senior Member
    Join Date
    Mar 2009
    Posts
    223
    Rep Power
    6

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 04:03 AM
  2. Replies: 0
    Last Post: 04-02-2009, 08:02 PM
  3. Replies: 10
    Last Post: 01-29-2009, 09:00 AM
  4. Replies: 2
    Last Post: 01-24-2009, 07:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 08:35 AM

Posting Permissions

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