0

When I run my program I get this:

Exception in thread "main" java.lang.NoClassDefFoundError: run/Run
Caused by: java.lang.ClassNotFoundException: run.Run
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

My project has never changed and this error has just started to arise. I've tried cleaning my workplace, deleting it, deleting the settings. Nothing is working, and nothing has changed in my workplace.

2 Answers 2

1

Check your Run Configuration editor, then check which class is going to be run, and edit it to put the right package name in.

I shouldn't admit it, but sometimes, the best solution in these cases is to create a new project and copy the packages by drag and drop.

Sign up to request clarification or add additional context in comments.

1 Comment

Creating a new project and dragging the packages worked! Thanks :)
0

Pls take a look at if the classes already were created into /bin folder. And make sure you have set the correct JDK in library.

1 Comment

Oh yeah! That might be it. I will clean the bin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.