将Java应用程序放入文件管理器的上下文菜单中 [英] Put Java application into file manager's context menu

查看:143
本文介绍了将Java应用程序放入文件管理器的上下文菜单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu上使用Eclipse IDE。我的应用程序提供加密服务,我想将其集成到客户端操作系统中。我的问题是:
有没有办法将我的应用程序以编程方式放入文件管理器的上下文菜单(右键单击选项),而不管一个人正在使用的文件管理器?我还想知道是否有任何方法可以在Windows资源管理器上执行此操作。但我的猜测是它涉及向注册表添加值并且可以很容易地实现。

I'm using Eclipse IDE on Ubuntu. My app offers encryption services and I want to integrate it into the client OS. My question is: Is there a way to put my app programmatically into the context menu (right-click options) of the file manager, irrespective of the file manager a person is using? I would also like to know if there is any way I could do this on Windows explorer as well. But my guess is that it involves adding values to the registry and can be easily achieved.

那么,是否有一个在linux文件管理器上添加上下文菜单支持的通用解决方案如果我在Windows系统中做错了,也请纠正我。

So, is there a general solution to adding context-menu support on linux file managers, and also please correct me if I'm wrong about doing it in the windows system.

如果问题不清楚,请通知我。

Please inform me if the question is unclear.

推荐答案

如果你的目标是vanilla ubuntu,你可以假设文件管理器是Gnome Nautilus。
你可以写一个扩展名(可能在Vala / C / python中)到nautilus:

If you target vanilla ubuntu, you can assume that the file manager is Gnome Nautilus. You can write an extension (probably in Vala/C/python) to nautilus :

http://developer.gnome.org/libnautilus-extension/stable/

或您可以重复使用现有的扩展,例如nautilus-action或nautilus-script,它允许您将脚本绑定到上下文菜单条目。

Or you could re-use existing extensions, like nautilus-action or nautilus-script which allow you to bind scripts to contextual-menu entries.

如果要支持所有文件管理员在那里,你必须看看海豚(为KDE),thunar(对于xcfe),也许是pcmanfm ......

If you want to support all file managers out there, you have to look at dolphin(for KDE), thunar(for xcfe), and maybe pcmanfm...

编辑:
如果你想在java中编写你的插件,你可能想看看Gobject Introspection。不知道它是否有效。

Edit : If you want to write your plugin in java, you might want to look at Gobject Introspection. Don't know if it works yet.

这篇关于将Java应用程序放入文件管理器的上下文菜单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆