wormwood
wormwood

Reputation: 441

Source not found when debugging all projects

I know so many have posted this question here, and I tried their solutions but can't make it work. All projects I debug get this "source not found" whenever I press f5. I've just created a simple app like: System.out.println("test"); It runs, but when I debug "source not found" always appears. I'm new to this. I have no idea what to do. Here's the stack trace:

Class<T>.getDeclaredMethods0(boolean) line: not available [native method
Class<T>.privateGetDeclaredMethods(boolean) line: not available
Class<T>.getMethod0(String, Class<?>[]) line: not available
Class<T>.getMethod(String, Class<?>...) line: not available
LauncherHelper.getMainMethod(PrintStream, Class<?>) line: not available
LauncherHelper.checkAndLoadMain(boolean, int, String) line: not available
C:\Program Files\Java\jre7\bin\javaw.exe (Oct 24, 2013 12:22:07 AM)
sample.java Class<T>.getDeclaredMethods0(boolean) line: not available [native method] Outline
Source not found. An outline is not available

Thanks in advance.

Upvotes: 0

Views: 3569

Answers (1)

Abhijith Nagarajan
Abhijith Nagarajan

Reputation: 4030

Indeed source is not available. You are using JRE to run the program and it is the compiled code.

You have two options

  1. Download the source and attach it to the jar during debugging. Attach the Source in Eclipse of a jar
  2. Use JAD to decompile the class file automatically. http://www.mkyong.com/java/java-decompiler-plugin-for-eclipse/

Upvotes: 1

Related Questions