简体   繁体   English

IcedTea - 如何显示applet控制台..?

[英]IcedTea - how to show the applet console..?

since recently I think we are forced to use IcedTea to run applets in Ubuntu 11.10. 从最近以来我认为我们被迫使用IcedTea在Ubuntu 11.10中运行applet。 At least I don't see how to install Sun Java from the Software Center. 至少我没有看到如何从软件中心安装Sun Java。

I would like to debug an applet which gives problems in IcedTea. 我想调试一个在IcedTea中出现问题的applet。 However, I don't know how to show the applet console. 但是,我不知道如何显示applet控制台。 So no chance to see any Exceptions. 所以没有机会看到任何异常。

Cheers, Ruth 干杯,露丝

You can easily see near realtime the output of the IcedTea Java plugin by first running in two separate terminal windows the following commands then invoking the applet in your web browser. 您可以通过首先在两个单独的终端窗口中运行以下命令然后在Web浏览器中调用applet,轻松地看到IcedTea Java插件的输出接近实时。

$ watch -n 1 'cat $HOME/.icedteaplugin/java.stdout'

or 要么

$ watch -n 1 'cat $HOME/.icedteaplugin/java.stderr'

java.stdout contains standard output of the running applet whereas java.stderr will capture standard error output (capture exceptions trace here). java.stdout包含正在运行的applet的标准输出,而java.stderr将捕获标准错误输出(此处捕获异常跟踪)。

Note : the "-n" option flag lets you specify the refresh rate in seconds. 注意:“-n”选项标志允许您以秒为单位指定刷新率。

On Ubuntu 12.04, the location of the log files seems to have changed to ~/.icedtea/log (~ meaning your home directory.) 在Ubuntu 12.04上,日志文件的位置似乎已更改为~/.icedtea/log (〜表示您的主目录。)

Alternatively to Tellurant's solution, you can open the log files ~/.icedtea/log/java.stderr and ~/.icedtea/log/java.stdout in gedit and click on reload every time something changes. 作为Tellurant解决方案的替代方案,您可以在gedit中打开日志文件~/.icedtea/log/java.stderr~/.icedtea/log/java.stdout ,并在每次更改时单击重新加载。 The dot in front of icedtea makes the .icedtea directory a hidden directory. icedtea前面的点使.icedtea目录成为一个隐藏目录。 Hit CTRL-H in nautilus to see hidden directories. 在nautilus中按CTRL-H查看隐藏目录。

代替手表,尾巴-f或更少,然后按+ f(跟随)可以使用。

In case you do want to install Oracle Java (Sun was bought by Oracle), here is a good guide: 如果您确实想要安装Oracle Java(Sun是由Oracle购买的),这里有一个很好的指南:

http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

Here are the command line commands: 以下是命令行命令:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM