0

This question originates from an old pain in Eclipse. The icons are way too small on high dpi displays. Searching for the icons (perhaps .png or .gif files) in the filesystem doesn't help either. They are hidden in the Eclipse jar files.

enter image description here

Luckily, the newest Neon version promises to work on the issue. Nevertheless, I would be thrilled if I could reach the icons and tweak them. It would be so much fun to make my programming environment completely custom.

Is it possible to open a jar file, take out some icons, replace them with your own, close the jar file and start up Eclipse?

Or is the only way to download the whole Eclipse sourcecode somewhere on Github and compile everything from scratch (with your own icons replacing the original ones)? If that is the only possibility, then I give up (unless I can get a tutorial somewhere on how to build it).

EDIT: Apparently, you cannot just change some files in a jar because that messes up the 'signature'. Eclipse won't run the plugin jar anymore that you've altered. Someone redirected me to the following StackOverflow topic that describes how to unsign a jar file: Unsigning a signed jar

When you sign a jar file, new files get added to the META-INF directory, e.g. "MKSIGN.SF" and "MKSIGN.DSA". Just remove them from the jar file (with any zip utility), and you have it unsigned.

I've followed this advice, but it did not help. Eclipse still refuses to run any plugin jar that I've altered.

EDIT: These are the files I delete in the jar-file:

  • META-INF/ECLIPSE_.SF
  • META-INF/ECLIPSE_.RSA
Community
  • 1
  • 1
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
  • **How** have you followed that advice, what error message do you get? Which file exactly did you remove? The exact names of the signing files in Eclipse are different. – Jonah Graham Jun 01 '16 at 22:09
  • Hi Mr. @JonahGraham, Thank you very much for your help. I've added an **EDIT** to answer your questions. – K.Mulier Jun 02 '16 at 09:30
  • OK, it worked for me when I did it. Without error messages as to the problem I simply can't help anymore. My guess is that the re-jarred files are in someway no longer correct. Have you tried using the "jar" tool to operate. – Jonah Graham Jun 02 '16 at 22:08
  • Hi @JonahGraham , thank you so much for your help and patience. I basically convert the jar to a zip file (by simply replacing the .jar with .zip in the filename), unzip it, make the changes (deleting those two files), convert the folder again into a zip file, and replace the .zip in the filename with .jar. Maybe my approach is a bit naive? – K.Mulier Jun 02 '16 at 22:53
  • I've just taken a look at your website kitchwacoders. It's really awesome. You're actually one of the eclipse developers? – K.Mulier Jun 02 '16 at 23:04
  • I don't know about editing the jar file that way. Anyway, what error message did you get? If you are unsure, start eclipse form a console/terminal (eclipsec on Windows) and then look in /configuration/*.log and/or /.metadata/.log – Jonah Graham Jun 03 '16 at 00:19

2 Answers2

7

Eclipse plugin jars are signed and won't work if Eclipse thinks they have been tampered with. So yes you would have to build them from scratch to change them.

Eclipse Neon (4.6) which is due to be released in June has some improvements for high DPI screens so you could try that. Release Candidate 3 is currently available.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • Thank you sir. Is building from scratch doable? Are there any step by step guides that help you through the whole process (on Windows)? – K.Mulier May 31 '16 at 19:32
  • Sorry, I don't know about building from scratch. – greg-449 May 31 '16 at 19:34
  • @K.Mulier You can checkout the code you want from https://git.eclipse.org/c/ and then (generally) do mvn package and the result will be in the releng.p2/target/repository directory – Jonah Graham May 31 '16 at 21:39
  • PS You could also strip out all the signing in an existing JAR and change the contents. – Jonah Graham May 31 '16 at 21:40
  • What do you mean by "strip out all the signing"? – K.Mulier May 31 '16 at 21:41
  • @K.Mulier Have a search around on SO, perhaps [Un signing a signed jar](http://stackoverflow.com/questions/1291978/un-signing-a-signed-jar) can help? – Jonah Graham May 31 '16 at 22:13
  • Thank you @Jonah Graham. Unfortunately, it doesn't work. Eclipse refuses to run my jar if I remove the signatures. See **EDIT** in my question. – K.Mulier Jun 01 '16 at 09:47
-2

A jar file is a rar file with some predefined directories and meta files inside. There may be some kind of hash check specific to eclipse, but for a basic JAR, you can extract it, modify resources, and recompress and it works great. Try opening the jar you are working on with WinRAR. I bet you it will be a open, edit, close type of deal.

Curved
  • 62
  • 5
  • I've already tried it that way, but it didn't work. Maybe I did something wrong? Can you try it? – K.Mulier May 31 '16 at 19:19
  • 2
    A .jar file is not a RAR file. It’s a zip file, which is one of the formats WinRAR can open. – VGR May 31 '16 at 20:25