简体   繁体   English

Eclipse和JBoss没有刷新或重建

[英]Eclipse and JBoss not refreshing or rebuilding

I'm having this problem in eclipse (EE) when I change things in my code (even something as simple as the text I'm printing using println) it doesn't get applied. 我在eclipse(EE)中遇到这个问题,当我改变代码中的东西时(即使是像我使用println打印的文本一样简单)它也没有得到应用。 I'm using JBoss and when I rerun the servlet, nothing happens. 我正在使用JBoss,当我重新运行servlet时,没有任何反应。

Any idea how I can force JBoss/Eclipse to do this? 知道如何强制JBoss / Eclipse这样做吗? I can't preview anything so it's really annoying if I want to test some new code. 我无法预览任何内容,所以如果我想测试一些新代码真的很烦人。

Thanks! 谢谢!

Eclipse publishes the newer versions of your application periodically (its called the automatic publish feature). Eclipse会定期发布应用程序的较新版本(称为自动发布功能)。 Either the interval is too large, or you're not waiting sufficiently long enough for re-deployment, or automatic publishing of the application has been disabled. 间隔太大,或者您没有等待足够长的时间来重新部署,或者已禁用应用程序的自动发布。

Sometimes, despite ensuring the above, Eclipse might still not publish the newer classes, in which case you might want to perform a clean build, which causes the newly built classes to be loaded into JBoss. 有时,尽管确保了上述内容,但Eclipse可能仍然不会发布较新的类,在这种情况下,您可能希望执行一个干净的构建,这会导致新构建的类被加载到JBoss中。

Sorry to ask such a basic question: Do you save your changes before testing? 很抱歉提出这样一个基本问题:您是否在测试前保存更改?

Eclipse uses its own compiler to check for syntax errors while you are editing, but you have to save the file before the edits take effect in the application. Eclipse在编辑时使用自己的编译器来检查语法错误,但您必须在编辑在应用程序中生效之前保存文件。

I only ask because this could be confusing if you are new to Eclipse, having changed from a different IDE. 我只是问,因为如果你是Eclipse的新手,从一个不同的IDE改变了,这可能会令人困惑。 File permission settings can also prevent your files from being saved or built. 文件权限设置还可以防止保存或构建文件。

Working on EJB deployed in JBoss with Eclipse IDE. 使用Eclipse IDE处理在JBoss中部署的EJB。 We have ANT build file, in which first old project is deleted from JBoss, then compiling classes, & building proper directory structure & deploy as .ear - .sar again in JBoss directory. 我们有一个ANT构建文件,其中第一个旧项目从JBoss中删除,然后编译类,构建正确的目录结构并在JBoss目录中再次部署为.ear - .sar。

Stop JBoss, run build file, start JBoss. 停止JBoss,运行构建文件,启动JBoss。

Its a good practice to have a build file to deploy project. 有一个构建文件来部署项目是一个很好的做法。

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

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