桌面浏览不适用于Java for Ubuntu [英] Desktop browse does not work in java for Ubuntu

查看:81
本文介绍了桌面浏览不适用于Java for Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

desktop = Desktop.getDesktop().browse(uri);

以上代码在Ubuntu OS中不起作用.如果执行此代码,则我的应用程序将被触发并挂起一段时间,在此期间,我无法在Java控制台中停止正在运行的应用程序.关闭该应用程序的唯一方法是通过 FORCE QUIT (强制退出).

The above code does not work in the Ubuntu OS. If I execute this code, then my application gets struck and hangs for a while and during that time I cannot stop the running application in java console. The only way am able to close that application is by FORCE QUIT.

推荐答案

有多个关于此问题的主题.我在Ubuntu 16.04上也有同样的问题.我在这里发布了我正在使用的解决方法: Desktop.getDesktop().browse Hangs

There are several threads on this issue. I have the same hangs on Ubuntu 16.04. I have posted here the workaround that I'm using: Desktop.getDesktop().browse Hangs

这篇关于桌面浏览不适用于Java for Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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