Can you do icon overlays using Java on Windows OS

好久不见. 提交于 2020-01-05 17:36:31

问题


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:


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.



来源:https://stackoverflow.com/questions/4589929/can-you-do-icon-overlays-using-java-on-windows-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!