You need to find what variable has the null value. A way to do that is to print out the values of the variables in the statement where the error occurs and see which one has the null value. ...
Type: Posts; User: Norm
You need to find what variable has the null value. A way to do that is to print out the values of the variables in the statement where the error occurs and see which one has the null value. ...
Where is the line that your println() prints out BEFORE the statement with the error?
I don't understand what you are doing???
To find the problem, you need to execute the code that has the problem, not some other version.
Keep adding println() statements to show the variables...
That's good that you are not getting the exception any more. Strange that it only happened once.
Did the program get the exception immediately after those println()s were executed?
Keep adding println() statements to show the variables used on each line until you see the variable that is...
Did the program get the exception immediately after those println()s were executed?
Keep adding println() statements to show the variables used on each line until you see the variable that is null.
What variable has the null value? If you don't know, add a println() statement to print out the values of all the variables.
Where is that variable assigned a value?
There is a variable with a null value when line 206 is executed. Look at line 206, find the variable with the null value and find out why it has a null value.
Try debugging the code by adding some println statements to print out messages showing execution flow and the values of variables as the code executes. The print out will help you see what the...
Are there any error messages?
Locally executing a class from a jar file or from a disk file should not make any difference.
The java command requires that the class it starts executing have a main() method.
Applets do not use a main() method.
Read the tutorial that I have given you several links to. It's explained...
Put all the files used by the program into the jar file as said in post#2
That says the class file was created by a newer version of java (1.7) than the version of java being used to execute...
You can put any files into a jar file.
What is done with that jar file depends on what program is reading it.
No, you don't need to put the classes in packages.
Put the classes into a jar file and add an archive= attribute to the <applet tag in the html