java 跟踪 Javaws 启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4453339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 06:26:59  来源:igfitidea点击:

Tracing Javaws launch

javajnlpjava-web-start

提问by PhilDin

I have a Java application which is launched via Java Webstart. Occasionally, following a new deployment of the application, it will happen that launching the application results in it being downloaded twice on every launch. I haven't got to the bottom of this but I think it may be related to our squid proxy which seems to interact badly with Java. What I would like, in order to investigate this further, is to see a trace of what javaws is doing. Is there any such option available to javaws?

我有一个通过 Java Webstart 启动的 Java 应用程序。有时,在应用程序的新部署之后,启动应用程序会导致每次启动时下载两次。我还没有深入了解这一点,但我认为这可能与我们的鱿鱼代理有关,它似乎与 Java 交互不佳。为了进一步调查这一点,我想要看到 javaws 正在做什么的踪迹。javaws 有没有这样的选项?

Just a minor update, if Java is configured to show the console then hitting "5" when focussed on the console will set the logging level to 5 which is the most verbose logging level. This can be useful but it doesn't address cases where the application doesn't get this far.

只是一个小更新,如果 Java 被配置为显示控制台,那么在关注控制台时点击“5”会将日志级别设置为 5,这是最详细的日志级别。这可能很有用,但它不能解决应用程序无法实现的情况。

回答by jansohn

To enable full trace mode issue the following commands in a command line:

要启用完整跟踪模式,请在命令行中发出以下命令:

"C:\Program Files (x86)\Java\jre8\bin\javaws.exe" -userConfig deployment.trace true
"C:\Program Files (x86)\Java\jre8\bin\javaws.exe" -userConfig deployment.trace.level all

The trace files will be placed in %USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\log.

跟踪文件将放置在%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\log.

To disable full trace mode again:

再次禁用完整跟踪模式:

"C:\Program Files (x86)\Java\jre8\bin\javaws.exe" -userConfig deployment.trace
"C:\Program Files (x86)\Java\jre8\bin\javaws.exe" -userConfig deployment.trace.level

回答by Jan Zyka

You may either want to run the jnlp file with -verboseoption via javawscommand from the command line and/or check the logs. The logs location is java version dependant, In earlier windows releases default path was: c:\Documents and Settings\_user_\Application Data\Sun\Java\Deployment\log

您可能希望-verbose通过javaws命令行中的命令运行带有选项的 jnlp 文件和/或检查日志。日志位置取决于 Java 版本,在较早的 Windows 版本中,默认路径为: c:\Documents and Settings\_user_\Application Data\Sun\Java\Deployment\log

In Windows 7,default path is 'C:\Users\_user_\AppData\LocalLow\Sun\Java\Deployment\log'

在 Windows 7 中,默认路径是 'C:\Users\_user_\AppData\LocalLow\Sun\Java\Deployment\log'