Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.ClassNotFoundException: can't successfully load the class source
    text
    copied!<p>I am working on an Android project - so far so good. Today I added some extra Java code to the project - I will call it here calcCode. This is some code doing calculations in the background and is not Android specific - I will just be using it in my project. </p> <p>I added that new code to a different package than my Android code under the same project.</p> <p>So what I have is:</p> <pre><code>Project AndroidPackage AndroidCode SomeJaveCodePackage UtilityCode </code></pre> <p>For some reason, when I try to debug the calcCode I get this annoying source not found error. Still - the code runs and delivers the correct results as always. I took the calcCode from some other project and copied the files into my new Android project. When I couldn't see the source I deleted all the calcCode files and manually created them by first creating a class file under the relevant package and then copy-pasted the code in. I thought this will help Eclipse recognize the path of the classes.</p> <p>I also tried to: "Edit Source Lookup Path" and add the source code of the class I was trying to debug.</p> <p>This didn't change anything - I can still not debug the code. I read several answers to this issue on StackOverflow. Most deal with Junit and Tomcat and I followed their recommendations but it didn't change the situation.</p> <p>Anyone knows why this is happening?</p> <p>I have Eclipse Indigo.</p> <hr> <p>EDITED after m0skit0's remarks: Thank you m0skit0 for the help. I meant to ask only one question (I might have mixed up stuff on the way). My question is: Why can't Eclipse find my own code while I debug it. It used to work in a former project (that I was able to follow the code through all the app's course during debug).</p> <p>What I do is set a break point at</p> <pre><code>Tour myTour = new Tour("res/raw/td.csv", "readCSV"); </code></pre> <p>Tour is my own hand-made class. When I press F5 in order to step into it I get the error: java.lang.ClassNotFoundException and in the code window I get Source not found and a button Edit source lookup path. </p> <p>This is the call stack:</p> <pre><code>Thread [main] (Suspended) ClassNotFoundException(Throwable).&lt;init&gt;(String, Throwable) line: 286 ClassNotFoundException(Exception).&lt;init&gt;(String, Throwable) line: not available ClassNotFoundException(ReflectiveOperationException).&lt;init&gt;(String, Throwable) line: not available ClassNotFoundException.&lt;init&gt;(String) line: not available URLClassLoader$1.run() line: not available URLClassLoader$1.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction&lt;T&gt;, AccessControlContext) line: not available [native method] Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: not available Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available Launcher$AppClassLoader.loadClass(String, boolean) line: not available Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available TestAllPlayAll.main(String[]) line: 15 </code></pre> <p>Thanks, D</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload