Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Not able to debug code in eclipse. (The source attachment does not contain the source for the file ImmutableMap.class.)
Not able to debug code in eclipse. [message #1802077] Thu, 31 January 2019 21:15 Go to next message
Man Kan is currently offline Man KanFriend
Messages: 8
Registered: January 2019
Junior Member
I am not able to debug code. Getting below message

The source attachment does not contain the source for the file ImmutableMap.class.
You can change the source attachment by clicking Change attached Source .

After clicking on the Change Attached Source, I get 'Source Attachment Configuration' pop up.

It says to select the location containing the source for 'guava-25.0-jar'

I gave the external location path for the above jar file.It didn't resolve the problem.
I also tried to give external location path for src.zip file in jdk folder. Didn't work.

Please help in resolving the issue.

Re: Not able to debug code in eclipse. [message #1802086 is a reply to message #1802077] Thu, 31 January 2019 23:37 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3705
Registered: July 2009
Senior Member

Do either of those actually contain the sources to the classes in the guava jar?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Not able to debug code in eclipse. [message #1802089 is a reply to message #1802086] Fri, 01 February 2019 01:53 Go to previous messageGo to next message
Man Kan is currently offline Man KanFriend
Messages: 8
Registered: January 2019
Junior Member
I don't know. How do i find that?
Re: Not able to debug code in eclipse. [message #1802129 is a reply to message #1802089] Fri, 01 February 2019 16:21 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3705
Registered: July 2009
Senior Member

The src.zip file in the JDK would only have sources for classes in the JDK itself. Find the guava jar where it is shown in your Package Explorer view and you should be able to look at its contents.

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Not able to debug code in eclipse. [message #1802146 is a reply to message #1802077] Fri, 01 February 2019 21:02 Go to previous messageGo to next message
Man Kan is currently offline Man KanFriend
Messages: 8
Registered: January 2019
Junior Member
Yes. I found the ImmutableMap.class under guava-5.0-jre.jar/com.google.common.collect in PackageExplorer view. What is the next step I need to do?
Re: Not able to debug code in eclipse. [message #1802153 is a reply to message #1802146] Sat, 02 February 2019 06:14 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3705
Registered: July 2009
Senior Member

Eclipse is asking for the jar or directory containing com/google/common/collect/ImmutableMap.java.

Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Sat, 02 February 2019 06:15]

Report message to a moderator

Re: Not able to debug code in eclipse. [message #1802169 is a reply to message #1802077] Sat, 02 February 2019 17:07 Go to previous messageGo to next message
Man Kan is currently offline Man KanFriend
Messages: 8
Registered: January 2019
Junior Member
I gave the external path location for "guava-25.0-jre.jar" in the "source attachment configuration" pop-up which appears by clicking on "Change attached source"

Then when i debug it again gives me message "source not found". It asks me to select the location containing the source for 'guava-25.0-jre.jar'.

I am not sure why i am getting this again even after giving the path for 'guava-25.0-jre.jar'

Re: Not able to debug code in eclipse. [message #1802178 is a reply to message #1802169] Sun, 03 February 2019 03:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31149
Registered: July 2009
Senior Member
Note a source attachment must contain source file and source files means *.java files but you've already said this jar file contains *.class files (compiled files). If it doesn't also contain *.java files you need to point at a jar or folder that actually has corresponding source files.
Re: Not able to debug code in eclipse. [message #1802192 is a reply to message #1802178] Sun, 03 February 2019 15:03 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1437
Registered: July 2009
Senior Member
You should be able to get the source code from the github page for guava. On the release page, there are source zip and tar.gz files listed for each release. You should download from the 25.0 release since that looks to be what you are using.
https://github.com/google/guava/releases
Previous Topic:Eclipse + Kotlin + Junit: Erros while using @Test annotation
Next Topic:Eclipse Installation Problem
Goto Forum:
  


Current Time: Mon May 25 21:35:45 GMT 2020

Powered by FUDForum. Page generated in 0.03255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top