Results 1 to 10 of 10
- 04-03-2009, 06:43 PM #1
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.
- 04-03-2009, 06:48 PM #2
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
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.
- 04-03-2009, 06:51 PM #3
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??
- 04-03-2009, 07:50 PM #4
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
well, how are you running it? what is the actual command you use?
- 04-03-2009, 07:52 PM #5
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"
- 04-03-2009, 09:10 PM #6
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"
- 04-04-2009, 03:37 PM #7
Has anyone got any ideas?
:confused:
- 04-04-2009, 04:44 PM #8
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
I got 'Unable to access jar file Assessment3Bmi.jar'java -jar "Assessment3Bmi.jar"
Can someone tell me where I am going wrong?
Thanks in advance
- 04-04-2009, 05:51 PM #9
Member
- Join Date
- Mar 2009
- Posts
- 40
- Rep Power
- 0
Why not unpack the jar archive and then run it?
If that is possible. Dont know, just a noob here.
- 04-04-2009, 05:55 PM #10
Similar Threads
-
Java, Military Format using "/" and "%" Operator!!
By sk8rsam77 in forum New To JavaReplies: 11Last Post: 02-26-2010, 03:03 AM -
final String currentWorld = "Java Forums"; String.format("Hello %s", currentWorld);
By mcfrog in forum IntroductionsReplies: 0Last Post: 04-02-2009, 07:02 PM -
[SOLVED] pls help :S . "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerE
By ara in forum New To JavaReplies: 10Last Post: 01-29-2009, 08:00 AM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks