4

Is it possible to disable or remove the built-in Java compiler from an Eclipse installation?

I would like to use the XML editing and validation features of Eclipse in an environment that forbids installation of compilers. Can the compiler be disabled/removed without breaking the XML editing and validation functions? How?

Comments in this related question suggest that it can't be done, but I don't need the Java development features of Eclipse (and don't expect them to work without the compiler).

Community
  • 1
  • 1
David Hunt
  • 128
  • 2
  • 9

3 Answers3

3

Yes, it is certainly possible to create an Eclipse install without the Java compiler (or JDT to be specific). The real question is whether the XML tools have an indirect dependency on JDT that will pull that back in.

Here is what I would try...

Download Eclipse Platform zip. You can get it from this URL:

http://download.eclipse.org/eclipse/downloads/

Look under the Latest Releases heading. You will want to download something stable. The latest release now is 3.6.1...

http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php

Now find a heading called "Platform Runtime Binary" and download the zip that's right for your platform. Verify that file name is "eclipse-platform-[version]-[platform].zip". If it isn't you've downloaded the wrong thing.

Unzip it as you usually would an Eclipse distro. You now have a runnable Eclipse install, minus any and all interesting IDE functionality. In particular, there is no JDT.

Now it's time to install XML tools. Go to Help->Install New Software->Add and use this URL for the repository: http://download.eclipse.org/releases/helios/

Uncheck "contact all update sites during install to find required software".

Type in XML into the filter field. The feature you want is called "Eclipse XML Editors and Tools". Select it and hit finish.

Assuming it installs correctly, you will want to confirm that it didn't silently pull in JDT. Look at your Eclipse install in the plugins directory. See if you have org.eclipse.jdt.core plugin present. That's where the Java compiler lives.

Good luck and if you run into problems, a good place to ask follow-up questions is on the following forum. There a few people hanging out there that are pretty dedicated to the notion of some day creating an "XML IDE" eclipse distribution, so they should be glad to help you out.

http://www.eclipse.org/forums/index.php?t=thread&frm_id=88&

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61
  • 1
    Excellent answer - thanks for the detailed steps and pointer to the Eclipse forum. The Install New Software screen had the Helios url pre-configured, so the Add step wasn't necessary. Installing only the Eclipse XML Editors and Tools did not pull in any JDT components, which is exactly what I wanted. Validation isn't working yet, Preferences->Validation shows three validators (DTD Validator, XML Schema Validator and XML Validator), but they don't appear to be validating xml and xsd files - I'll recheck the configuration and preferences. – David Hunt Jan 21 '11 at 19:59
  • 1
    Validation is working with this solution - my initial quick test (see previous comment) was outside of a project, when I create a project and add my files validation works as expected. – David Hunt Jan 21 '11 at 21:50
0

I would ideally suggest you to move away from eclipse, coz there are a ton of tools (Quanta Plus IDE, Bluefish etc) that provide you with great XML editing and validation feature.

However, this forum might help you -> http://www.eclipsezone.com/eclipse/forums/t40126.html.

Ravikiran
  • 1,440
  • 11
  • 15
  • I am also evaluating other XML tools, but I wanted to include Eclipse in the set of tools under evaluation if it could be configured to meet my customer's network security requirements. The network security requirements forbid installation of compilers, so a user-controlled option to disable the compiler as suggested in the eclipsezone post would not satisfy my customers strict security requirements. – David Hunt Jan 21 '11 at 15:37
0

You can un-tick Project > Build Automatically for automatic builds not to happen and even remove the buttons with the Run and Debug functionality in order not to press them accidentally.

dimitrisli
  • 20,895
  • 12
  • 59
  • 63