Mac OS X java.lang.NoClassDefFoundError
Wed, 03/16/2011 - 13:11
My java code runs fine on a Windows machine but on Mac OS X it gives me this error:
java.lang.NoClassDefFoundError:
Any ideas?
Wed, 03/23/2011 - 09:56
#2
May have something to do with
May have something to do with case sensitivity, make sure in the compilr settings, that the package and class name matches the case of the class and its package perfectly.
Also is it a console application or a gui one?
I'm not all that familiar with Java, I can code it, just don't like to. Check to see what versions of Java you have on both systems, it may be the case that your Mac has an older version.
Secondly, I know there are Java debuggers out there. You run your java applet or app from within the debugger and as soon as something breaks it tells you what line of what file it broke on, and provides additional information. I don't remember what the name of the program was, but I have used one like that before.
Finally, it is entirely possible that one of the Java classes you are using is a custom class installed either by you or a 3rd party app. If that's the case, first figure out which class it is, locate the files for it, and copy it over to your Mac system.(In the proper place of course.)
That's about the extent of the advice I can give, though I'm sure there are others on here with more Java experience and know-how than I....Gentlemen, that's an invite. :)
----------------------------------------------------------------------------------------------------
"Coding your life, Compiling your dreams, and crashing your future."
Compilr - C# and VB.NET Advisor