Hi there, this is going ot sound realy stupid but...
After I posted on here I had a couple of difficulties with the code. First of all I'll inform you that I'm using Xcode on Mac OS X Panther. Firstly I changed a couple of the strings, after deciding that I wanted different text to appear in the main JTextArea on startup. I was rather miffed when the next text didn't show up. I changed the code again and again, in an attempt to try to figure out why my compiler seemed to be 'remembering' the old
string (even though it now existed nowhere in the Xcode Project). After playing with the code for about half an hour I tried to compile it again but this time something very odd happened; I got the error message:
Exception in
thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:85)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Now if I'm honest I don't have a clue what this meant, but it stopped my application from running, so I'm guessing it isn't good.
After copying the contents of the Java files, quitting Xcode, deleting the old versions of the files, creating a new project in Xcode and copying/pasting the old code back into a new project it started to run again.
Now when I load up the application it says:
-[NSJavaVirtualMachine initWithClassPath:] cannot instantiate a Java virtual machine
but continues to load it up as normal.
It also now loads the JLabels.
If anyone has an explination for this, or has heard of this happening elsewhere please tell me - I'm intruiged to know why Xcode is blocking my otherwise fine Java from compiling.
Yours - David