Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to setup JDT UI development environment
How to setup JDT UI development environment [message #1315137] Fri, 25 April 2014 20:33 Go to next message
Dmitry Spiridenok is currently offline Dmitry SpiridenokFriend
Messages: 12
Registered: August 2011
Junior Member
Hello all,

I've got some problems trying to set up my environment for solving a bug in JDT.
So actually my question is not really about using JDT, but about developing it, however some of the questions are probably a
I could not find any other place to post my question, so doing it here.
If there is a better place/way to get my questions answered, please let me know.

So I've clone the master branch of the GIT repository for jdt.ui (git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git) into my Eclipse workspace.
The checked out version by default gives me a lot of Java compile errors.

To fix them I try follow this page http://wiki.eclipse.org/JDT_UI/How_to_Contribute#Configuring_the_workspace. However I'm not very familiar with Eclipse JDT development environment, so some of the items on that page are not clear to me. So could you please provide me with the information on the following items:


1. "the target platform should be the latest 4.4 I-build" - where can I get that build? In my preferences I have only 1 option "Running Platform". So what needs to be done to get the latest 4.4 build?
2. "Enable API tooling" - how to enable it?
3. "...and specify an appropriate API baseline - for Luna the baseline should be 4.3.2" - In my workspace preferences there are no baselines. So I guess i need to get a baseline from somewhere. Where can I find the right baseline?
4. "You also need Java SE 5 or later" - my java -version output is
"java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)"
so I guess it's OK. Is it correct?

Any answers to my pretty basic questions will be appreciated.
Thank you in advance!
Re: How to setup JDT UI development environment [message #1315791 is a reply to message #1315137] Sat, 26 April 2014 05:21 Go to previous messageGo to next message
Noopur Gupta is currently offline Noopur GuptaFriend
Messages: 58
Registered: December 2012
Member
As mentioned in https://wiki.eclipse.org/JDT_UI/How_to_Contribute - Getting the code into your workspace, to satisfy dependencies on test projects you need to clone other git repositories also.

> 1. "the target platform should be the latest 4.4 I-build"
You can download the latest I-build from http://download.eclipse.org/eclipse/downloads/. Add it as the target platform in Preferences.

> 2. "Enable API tooling" and 3. "...and specify an appropriate API baseline..."
Download 4.3.2 build from the downloads page mentioned above and add it as the API Baseline in Preferences.

> "You also need Java SE 5 or later"
You have Java 7 JRE, which is OK. Check that it is added to "Installed JREs" in Preferences and set against the execution environments.
Otherwise download and add the specific JREs in Preferences to be strictly compatible with the required execution environments.
Re: How to setup JDT UI development environment [message #1315995 is a reply to message #1315791] Sat, 26 April 2014 08:05 Go to previous messageGo to next message
Dmitry Spiridenok is currently offline Dmitry SpiridenokFriend
Messages: 12
Registered: August 2011
Junior Member
Noopur, thanks a lot for your answer!

I'll try to download the latest 4.3.2 and 4.4 builds from that page and add them to my Eclipse preferences.

I've checked my workspace - jdk1.7.0 is installed there and is the (only) default JRE I have.

I'm aware that I need to clone extra repositories. However my current problems seem to be not related to the missing repositories.
Once the current problems are solved, I'll follow other steps mentioned on that page.
Re: How to setup JDT UI development environment [message #1324456 is a reply to message #1315995] Wed, 30 April 2014 20:04 Go to previous messageGo to next message
Dmitry Spiridenok is currently offline Dmitry SpiridenokFriend
Messages: 12
Registered: August 2011
Junior Member
I've downloaded org.eclipse.jdt.source from 4.3.2 and also one of the latest integration builds (I20140422-0800).
I also cloned org.eclipse.jdt.core repository into the same Eclipse workspace.
After setting the API baseline to 4.3.2 and using the latest integration build as build platform, I still get a lot of problems (about 15000).

Something pretty fundamental goes wrong with my installation because I get compiler errors on importing classes from all basic packages (like org.eclipse.core and org.eclipse.swt).

Do I need to download and install latest integration versions of other plugins like SWT?
Is it a problem that I use Eclipse Luna for my development?
Are there any other things I can verify/fix to make it working?

Thanks in advance!
Re: How to setup JDT UI development environment [message #1332303 is a reply to message #1324456] Sun, 04 May 2014 15:06 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Quote:
Something pretty fundamental goes wrong with my installation because I get compiler errors on importing classes from all basic packages (like org.eclipse.core and org.eclipse.swt).


If you indeed defined the recent integration build as your target platform (Preference > Plugin Development > Target Platform), you should be able to compile the JDT sources with no further stuff installed.

To check you may want to follow this chain:
- what plugin project contains the compile errors?
- check that plugin's MANIFEST.MF, does it have resolve errors, too?
- are the bundles required by your workspace projects contained in the target platform (check the "Content" tab when editing the target platform via the preference).

HTH
Stephan
Re: How to setup JDT UI development environment [message #1339696 is a reply to message #1332303] Wed, 07 May 2014 20:06 Go to previous messageGo to next message
Dmitry Spiridenok is currently offline Dmitry SpiridenokFriend
Messages: 12
Registered: August 2011
Junior Member
Hello Stephan,

Here is my situation:
- All plugins contain compile errors. I tried to close the most of the project and left only org.eclipse.jdt.ui and org.eclipse.jdt.core but still have a lot of errors.
- Yes, the MANIFEST.MF of the plugins have resolve errors like "Bundle 'org.eclipse.core.runtime' cannot be resolved".
- In the "Content" tab of my target platform i have only org.eclipse.jdt.* plugins. No other plugins like 'org.eclipse.core.*" are there.

Could it be that I do not have all the target builds of the required plugins? I downloaded only integration build of org.eclipse.jdt.source from http://download.eclipse.org/eclipse/downloads/. I could not find any source of the eclipse platform on this page.

Another strange thing that might be a clue to the root of my problems. In my "Target Content" editor i have the directory with org.eclipse.jdt.source I downloaded from the site above. If i enable "Show local content" and expand this directory I see a list of 49 available plugins. I also downloaded several other archives from the same site like eclipse-platform-I20140504-2000-win32.zip or swt-I20140422-0800-win32-win32-x86, but if I add them to the target content, "Show local content" shows me 0 available plugins. So how can I add core plugins to the target content of my target platform?

Thanks again in advance!
Re: How to setup JDT UI development environment [message #1339737 is a reply to message #1339696] Wed, 07 May 2014 20:32 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Quote:
In the "Content" tab of my target platform i have only org.eclipse.jdt.* plugins. No other plugins like 'org.eclipse.core.*" are there.


So that is definitely not enough.

Quote:
Could it be that I do not have all the target builds of the required plugins? I downloaded only integration build of org.eclipse.jdt.source from http://download.eclipse.org/eclipse/downloads/. I could not find any source of the eclipse platform on this page.


You should look for "Eclipse SDK". You don't need the JDT sources in the target platform, because that's what you have in your workspace. What you need is "everything else" and binary form is sufficient in the target platform. Eclipse SDK might be more than needed, but that should definitely work, and actually does contain sources for easy browsing.

@Noopur, is SDK what you'd recommend, or is Platform Runtime Binary actually good enough? I guess this could be clarified in the wiki Smile

cheers,
Stephan
Re: How to setup JDT UI development environment [message #1340968 is a reply to message #1339737] Thu, 08 May 2014 08:57 Go to previous messageGo to next message
Dmitry Spiridenok is currently offline Dmitry SpiridenokFriend
Messages: 12
Registered: August 2011
Junior Member
I modified my platform configuration to include one of the integration builds of the complete eclipse SDK.
Now all trivial errors (like "org.eclipse.core is not found" are gone).
So that was indeed my fault and now it's solved.

Another confusing thing was that i have to explicitly select the "plugins" sub-directory in my eclipse-SDK-I20140506-2000-win32-x86_64 location while specifying target platform. I'm used to selecting the overall directory and let the Eclipse to figure out which plugins are in that directory.

But OK, now it seems like I have the right baseline. But I still have many problems left.
Some of them are like errors in the org.eclipse.jdt.ut/MANIFEST.MF file:
org.eclipse.jdt.core;bundle-version="[3.9.0,4.0.0)", -> Unsatisfied version constraint: 'org.eclipse.jdt.core: [3.9.0,4.0.0)'

If I close all other projects in my workspace (leaving only org.eclipse.jdt.ui open) and try to run a new Eclipse application from my workspace, I get a lot of other errors like:
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.pde.api.tools.ui [714]
  Unresolved requirement: Import-Package: com.ibm.icu.text; version="3.6.1"

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.pde.build [715]
  Unresolved requirement: Import-Package: com.ibm.icu.util

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.pde.ds.ui [719]
  Unresolved requirement: Require-Bundle: org.eclipse.ui; bundle-version="[3.3.0,4.0.0)"
    -> Bundle-SymbolicName: org.eclipse.ui; bundle-version="3.106.0.v20140428-2006"; singleton:="true"
       org.eclipse.ui [741]
         Unresolved requirement: Require-Bundle: org.eclipse.jface; bundle-version="[3.10.0,4.0.0)"; visibility:="reexport"

So most likely I miss something else. Could you please help me with that?
Re: How to setup JDT UI development environment [message #1366719 is a reply to message #1340968] Mon, 19 May 2014 12:46 Go to previous message
Noopur Gupta is currently offline Noopur GuptaFriend
Messages: 58
Registered: December 2012
Member
If you are using the latest I-build of Luna itself for the code setup and development, then explicitly setting the Target Platform is also not required.
By default, Running Platform is taken as the target platform. (Make sure that Running Platform is checked in Target Platform preference.)

Regarding the error in jdt.ui manifest, I think you need to pull the latest code from all the repositories.
As per the latest code, the requirement in jdt.ui manifest is:
org.eclipse.jdt.core;bundle-version="[3.10.0,4.0.0)"

and not:
org.eclipse.jdt.core;bundle-version="[3.9.0,4.0.0)"
Previous Topic:lambda expression template
Next Topic:Default Java compiler settings
Goto Forum:
  


Current Time: Thu Dec 05 22:45:56 GMT 2024

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

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

Back to the top