Overlay file icon in java for windows

I am trying to implement icon mapping on files and folders in the same way as Tortoise SVN or Dropbox.

I searched a lot on the Internet, but I can not find a solution in Java.

Can anyone help me with this? enter image description here

+7
source share
3 answers

Sorry to have confirmed my fears, but this cannot be done in Java.

Since Windows Explorer is the manager, Icon Overlay is a kind of plugin. It should be implemented as a DLL (not JNI, but a real native DLL) and registered in the Windows registry. As you saw in the CodeProject article, your DLL must implement a specific interface - IShellIconOverlayIdentifier .

Take, for example, the implementation of TortoiseSVN .

TortoiseSVN DLL is loaded by explorer and attached to its process:

 DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /* lpReserved */) { ... if (dwReason == DLL_PROCESS_ATTACH) ... 

To do this in Java, you will need to write a DLL that will load the JVM and your JAR, which would be redundant.

Regarding the overlay on the Tray icon, your Java application is the host, so you can do it.

+4
source

I had the same problem and I found a solution for Java 1.7+ combined with native and jni-dll. Works with Windows Vista +, Mac, and Linux.

Here you can find the GIT project: https://github.com/liferay/liferay-nativity

See my SO question here: How to use overlays for Windows Explorer firmware using Java

+1
source

Have you tried liferay christmas i can't build a solution

0
source

All Articles