[英]Launching new version of a Java application opens old version
I have got a new version of a Java Swing Application (DMG file) that I want to test, but it keeps opening the Old version of the application, even though I have deleted the old application. 我已经有了要测试的Java Swing应用程序(DMG文件)的新版本,但是即使我删除了旧应用程序,它仍会继续打开该应用程序的旧版本。 It's like it's opening a cached version. 就像打开缓存版本一样。
This is how I install the application: 这是我安装应用程序的方式:
I only see this issue on OS X. On Windows it works fine. 我只在OS X上看到此问题。在Windows上,它工作正常。
I even tried running the jar file directly, and I see the same behaviour; 我什至尝试直接运行jar文件,并且看到了相同的行为。 it works on Windows but on Mac it shows the old version. 它可以在Windows上运行,但在Mac上可以显示旧版本。
I tried the following but I saw the same behaviour: 我尝试了以下操作,但是看到了相同的行为:
Restarting the computer 重新启动电脑
Clearing/Deleting the Java cache (from System Preference>Java>General>Temporary Internet Files>Settings>Delete Files...
) 清除/删除Java缓存(从“ System Preference>Java>General>Temporary Internet Files>Settings>Delete Files...
)
Lastly, I have tried this on a different Mac and I do NOT see the issue. 最后,我在另一台Mac上尝试过此操作,但没有看到此问题。 It seems like there is something specifically wrong with my OS X. 看来我的OS X特别有问题。
There was a copy of the old version in /Users/*/Library/Java/Extensions
which was required by the Robot test automation framework. Robot测试自动化框架要求/Users/*/Library/Java/Extensions
中有一个旧版本的副本。
Deleting it solved the issue. 删除它可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.