3
I am developing a project that has many classes, and many files. java, and from time to time, from time to time, this problem happens, randomly. Let’s say: A class that I already used, is working perfectly, suddenly "rebells" and decides to make this mistake.
There is a way to "predict" and "avoid" this error, seeing that it is randomly appearing in my project?
I know how to solve the problem via code (so much so that there are several tutorials about it), but this project will be used in a company, and I will not have time to come and fix this every time the system resolve to "rebel".
How do you solve this problem via code? Just to see if I understand what happens.
– Math
Noclassdeffounderror usually happens when Classloader cannot read an informed class. Just pay some attention to the done Imports, and the application dependency libraries are correctly declared in the classpath, if the classes are all correctly in the application, this error will hardly occur.
– user28595
Math, I solve it in a very "rough" way, it’s not really in code, I copy all the contents of the file that I want to "fix" (Ctrl+a and Ctrl+c), delete the file, create a new one with the same name and paste everything back there, it goes back to working normally. diegofm, from what I’ve researched, is exactly what you said, but here’s the thing, I run the code 1 time to do.
– Thomas Braz Pinto
How are you running the program? Is it from an IDE, console? The problem class is inside a JAR?
– utluiz
I’m using the netbeans IDE, but by programming the components and the like into the nail, the windows are Jdialogs and button calls, they’re all in. java, I am currently using only netbeans "run" for testing, but will transfer to JAR when the program is completed
– Thomas Braz Pinto