How to get the sources of JDT of eclipse?
Asked Answered
C

5

7

I'm trying to write an Eclipse plugin, but I found that there is no source by default. I searched in www.eclipse.org, but didn't find anything.

My eclipse is 3.6.2. Where can I get the source of JDT?

Condensable answered 29/6, 2011 at 15:21 Comment(1)
I just found, the classic eclipse 3.6.2 already contains the sources jar of jdt. I download it and now can see the sourcesCondensable
F
2

Assuming that you want to be able to just look at JDT source code (as opposed to edit it), the easiest thing to do is to install the source plugins. Head over to the following update site for Helios:

http://download.eclipse.org/releases/helios/

Then look for an entry labeled JDT Source or similar. It may also be called JDT SDK, which would mean that it has the source plus some plugin developer docs.

Foreword answered 29/6, 2011 at 15:41 Comment(0)
J
19

It seems that in the latest versions of Eclipse (at least Juno and Kepler), the source is no longer included in the JDT bundle that is shipped with Eclipse. You have to go and download the p2 source repo manually:

  1. go to http://download.eclipse.org/eclipse/downloads/
  2. choose your release (e.g. 4.2 or 4.3M6)
  3. scroll down to "JDT SDK" and download the p2 repository
  4. from Eclipse, add the repository (type "archive")
  5. remember to uncheck "Group items by category", because this repository has no category, which makes Eclipse show nothing by default (which can be quite puzzling)
  6. check "Eclipse JDT Plug-in Developer Resources", Next >, Next >, Accept license, Finish.

Wait for the installation to finish, restart Eclipse, enjoy!

Joanajoane answered 26/3, 2013 at 11:41 Comment(0)
H
3

As others have pointed out, the JDT source is not included in the JDT bundle anymore. Neither is it available from the main update site (currently Mars: http://download.eclipse.org/releases/mars).

However, it is available from the Eclipse Project Updates site, which should already be in your list of available software sites:

http://download.eclipse.org/eclipse/updates/4.5

Open the category Eclipse Java Development Tools and select Eclipse JDT Plug-in Developer Resources. Much simpler than downloading a P2 repository manually, and always up to date!

Houseroom answered 7/12, 2015 at 11:53 Comment(0)
F
2

Assuming that you want to be able to just look at JDT source code (as opposed to edit it), the easiest thing to do is to install the source plugins. Head over to the following update site for Helios:

http://download.eclipse.org/releases/helios/

Then look for an entry labeled JDT Source or similar. It may also be called JDT SDK, which would mean that it has the source plus some plugin developer docs.

Foreword answered 29/6, 2011 at 15:41 Comment(0)
L
2

You can get it here: http://dev.eclipse.org/viewcvs/viewvc.cgi/

Lifeordeath answered 3/5, 2012 at 11:27 Comment(0)
B
0

Since Janurary 2017, the JDT jars are also published on maven central (announcement). See artifacts with groupId org.eclipse.jdt.

Example. For:

<dependency>
    <groupId>org.eclipse.jdt</groupId>
    <artifactId>org.eclipse.jdt.ui</artifactId>
    <version>3.13.51</version>
</dependency>

The sources jar is at the expected location:

http://repo1.maven.org/maven2/org/eclipse/jdt/org.eclipse.jdt.ui/3.13.51/org.eclipse.jdt.ui-3.13.51-sources.jar

(of course it is better to use tools like maven to find and download the sources jars)

Babbitt answered 14/3, 2018 at 12:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.