Mac OS X java.lang.NoClassDefFoundError

2 replies [Last post]
Offline
Last seen: 15 weeks 6 days ago
Joined: 03/15/2011
Posts:

My java code runs fine on a Windows machine but on Mac OS X it gives me this error:
java.lang.NoClassDefFoundError:

Any ideas?

magius96's picture
Offline
Last seen: 14 weeks 1 day ago
Joined: 04/13/2009
Posts:
Hmm...

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

tim.speed's picture
Offline
Last seen: 17 hours 39 min ago
Joined: 02/24/2010
Posts:
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?

-----------------
Tim Speed
Compilr Developer and CTO