Java NoClassDefFoundError help please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Java NoClassDefFoundError help please

I have a 14k long java file but when i run it it gives a error noclassdeffounderror. When i remove a part of the script it runs aigan. Maby the file is to bigg ? I does have a main file i already deleted netbeans cache

7th Mar 2023, 5:27 PM
Mischa Sissohore
4 Answers
+ 5
A huge file like this don't cause errors by itself, but makes error finding almost impossible. In the future, always split in smaller files with clear and delimited purposes. You already have some clues. Try to debug checking the parameters passed to functions and methods, and variable and attribute values in different parts of the code. Add assertions. Look for whatever which is not what you expect.
8th Mar 2023, 1:55 AM
Emerson Prado
Emerson Prado - avatar
+ 3
https://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html?m=1 Hope you get an idea why this happened and if your code is not very long then post the code here maybe we can try to help you
7th Mar 2023, 6:18 PM
Sakshi
Sakshi - avatar
+ 3
U have single file only..?
7th Mar 2023, 6:55 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Got more files but the thing is when i remove the top part of the file it loads and when i re add the top part and remove to bottom part it also runs fine the error only occurs when i run the whole project
7th Mar 2023, 7:41 PM
Mischa Sissohore