Can you do icon overlays using Java on Windows OS

2019-08-12 08:07发布

I would like to manupilate badges or icon overlays using Java on windows. Basically some files on the drive to have overlays depending what state those files are in. This should be visible through windows explorer. Something simillar to how DropBox does things. Is that possible?

I've seen several articles on this topic but none of them use Java. They all seem to use C++ or C# or COM objects. I was looking for a Java solution for windows. Of course I'd like to have a Java solution on Mac's too. Not sure if this is possible but before I give up I thought I ask.

1条回答
唯我独甜
2楼-- · 2019-08-12 08:39

You probably could get it set up on Windows, maybe even on OS X, but you'd have to write almost entirely separate code for each. Windows's interface for Explorer overlays is probably through COM, so you'd have to use JNI to get your Java code to talk to Explorer. For the Mac, you'd probably have to inject your code into the Finder at runtime, requiring more native code and completely different native code than Windows. To be honest, you're probably better off writing in portable C or C++ and then tacking on whatever interface you need.

tl;dr: You probably can on Windows, but it won't be easy. You probably can't on Mac, at least if you want to use Java.

查看更多
登录 后发表回答