Java Desktop browser() 打开 %u 而不是 URI

发布于 2024-12-28 21:01:44 字数 205 浏览 4 评论 0原文

嗯,我想标题已经说明了这一点。 当尝试使用桌面的 browser() 函数启动默认浏览器时,浏览器确实打开,但指向错误的 URI beeing %u

我无法将其缩小到代码,因为我没有更改它。 我所做的更改是操作系统现在是 Ubuntu 11.10 而不是 11.04

我安装了 Java 7,但继续使用 Java 6。

哪里出了问题?有什么线索吗?

Well, the title says it I guess.
When trying to launch the default browser by using the Desktop's browse() function, the browser does open but points to the wrong URI beeing %u

I can't narrow it down to the code, as I haven't changed it.
What I did change was the OS now beeing Ubuntu 11.10 instead of 11.04

And I installed Java 7, but keep using Java 6.

Where does it go wrong? Any Clues?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

守望孤独 2025-01-04 21:01:44

我知道我迟到了,但我也遇到了同样的问题。感谢这个问题中的所有好的提示和上面的评论,我在 gconf-editor 中找到了一个配置键:

/desktop/gnome/url-handlers/http/command (和类似的)

我在这个键中找到的命令是“firefox %u”。不幸的是,该键并没有得到很好的记录,但我注意到该区域的其他键使用“%s”作为参数。所以我尝试用“%s”替换“%u”,然后 - 耶! - 这该死的东西又起作用了。

我还想利用这个机会感谢 Canonical 的员工将 Unity 搞得如此彻底。

I know I'm late to the game but I had the same problem, too. Thanks to all the good hints in this question and the comments above I found a config key in gconf-editor:

/desktop/gnome/url-handlers/http/command (and similar)

The command that I found in this key was "firefox %u". Unfortunately, the key was not really documented very well but I noticed that other keys in that area used "%s" for the parameter. So I tried and replaced "%u" by "%s" and - yay! - the darn thing works again.

I'd also like to use this opportunity to thank the guys at Canonical for messing up Unity so thoroughly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文