您可以在 Windows 操作系统上使用 Java 进行图标叠加吗
我想在 Windows 上使用 Java 来操作徽章或图标覆盖。基本上,驱动器上的某些文件具有覆盖层,具体取决于这些文件所处的状态。这应该通过 Windows 资源管理器可见。与 DropBox 的工作方式类似。这可能吗?
我看过关于这个主题的几篇文章,但没有一篇使用 Java。它们似乎都使用 C++ 或 C# 或 COM 对象。我一直在寻找适用于 Windows 的 Java 解决方案。当然,我也希望在 Mac 上有一个 Java 解决方案。不确定这是否可能,但在我放弃之前我想我应该问一下。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能可以在 Windows 上进行设置,甚至可以在 OS X 上进行设置,但是您必须为每个功能编写几乎完全独立的代码。 Windows 的资源管理器覆盖层接口可能是通过 COM 实现的,因此您必须使用 JNI 来让您的 Java 代码与资源管理器进行对话。对于 Mac,您可能必须在运行时将代码注入到 Finder 中,这需要更多的本机代码以及与 Windows 完全不同的本机代码。老实说,您可能最好使用可移植的 C 或 C++ 编写,然后添加您需要的任何接口。
tl;dr:您可能可以在 Windows 上实现,但这并不容易。在 Mac 上你可能做不到,至少如果你想使用 Java 的话。
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.