有没有办法找出 javaws 在系统上的位置

发布于 2025-01-02 12:26:39 字数 194 浏览 3 评论 0原文

我们的许多用户在将 jnlp 文件与 javaws 关联时遇到问题。我知道有一种方法可以从命令行处理默认程序(至少对于windoes)。

无论如何,有没有办法从 java applet 内部找出 javaws 的位置?

假设您有权这样做。

编辑:相关问题:Java 和 javaws 是否始终可以从命令行访问(无需更改文件夹)

Many of our users have problem associating jnlp-files with javaws. I know there is a way to handle default program (at least with windoes) from commandline.

Is there anyway to find out where javaws is located, from inside an java applet?

Assuming you have the permission to do it.

EDIT: related question: Is Java and javaws always accessible from commandline (w/o having to change folder)

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

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

发布评论

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

评论(1

行至春深 2025-01-09 12:26:39

通过使用此代码片段修复:

/* Add check for os to add any extension */
String javaws = System.getProperty("java.home")
                    + File.separator + "bin"
                    + File.separator + "javaws";

Fixed through the use of this snippet:

/* Add check for os to add any extension */
String javaws = System.getProperty("java.home")
                    + File.separator + "bin"
                    + File.separator + "javaws";
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文