重置Java小程序上刷新 [英] Reset Java Applet on Reload

查看:132
本文介绍了重置Java小程序上刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要退出Firefox,然后重新启动它,以使小程序被刷新......
它是烦人,因为我仍然编程它的类文件的更改......我失去了一些codeS,这使得它无法刷新的小程序,仍然采取从缓存???

I need to quit firefox and restart it in order for the applet to be refreshed... its anoying since i'm still programming it an the class files changes... am i missing some codes which makes it unable to refresh the applet and still take the one from the cache???

所以,我在我的网站上,一款模拟游戏,每当用户点击屏幕上滋生的军队......有一个.jar不过小程序每当我刷新页面,则previous军队仍然存在在屏幕上..
我希望它被刷新(好像我们刚刚开始运行的第一次申请)。

So I have a .jar applet in my website, a simulation game that spawns army whenever user clicks on the screen... however whenever I refresh the page, the previous army are still there on the screen.. I want it to be refreshed (as if we're just starting to run the application the first time).

有什么建议?

我真的AP preciate它

I'd really appreciate it

感谢您....

推荐答案

每个你建立一个新的jar小程序添加一个版本号给它时间,例如 applet.jar?建立= 123 build123 / applet.jar 。这是部署好习惯也因为它消除所有缓存的担忧,这或许可以通过构建的解决方案可以简单自动化例如蚂蚁

Each time you build a new Jar applet add a build number to it, eg applet.jar?build=123 or build123/applet.jar. This is good practice for deployment too as it removes all cache concerns and this can probably be simply automated by your build solution eg Ant.

另外值得一用 separate_jvm 标记考虑,详细的此处。可用自1.6更新10.这将确保一个新的JVM每一个美元,你不必担心外挂特质如内存不足异常的对$ pvents刷新由于很多刷新的。

In addition it is worth considering using the separate_jvm tag, detailed here. Available since 1.6 update 10. It will ensure a new JVM each refresh which prevents you worrying about plug-in idiosyncrasies eg out of memory exceptions due to a lot of refreshes.

这篇关于重置Java小程序上刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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