- This topic has 7 replies, 2 voices, and was last updated 20 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
aannam01MemberI have couple of questions.
1.In my system when ever i am changing something in my Java class MyEclipse is not compileing the class.So I have to redeploy the project everytime.I have Build automatically checked.Is there anything else i have to configure?
2.How do i create a war file?I think i have to write a build.xml,could you give me some suggetsions about how to do this
Riyad KallaMember1) Java class compilation is controlled by Eclipse. Do you mean when you hit CTRL-S to save a file, you want the class compiled OR do you mean when you save the file you want the new changes deploy to your application server?
2) Open up the deployment dialog, select your Project you with to deploy and click “Add” to create a deployment, make sure to select “Packaged deployment”
aannam01MemberThanks for the reply.
1)When I save my file I want the class compiled and the changes to deploy to my application server.When i save my file i don’t see anything on my console, how can i make sure it is complieing the class.
Riyad KallaMember1)When I save my file I want the class compiled and the changes to deploy to my application server.
Be sure to use “Build automatically” (which you are) and use an exploded deployment for HotSync to be turned on.
When i save my file i don’t see anything on my console, how can i make sure it is complieing the class.
Eclipse uses an incremental compiler of IBM’s own design, not the javac.exe compiler. If you have “Build automatically” turned on, every time you save a file, the differences are compiled.
aannam01MemberSo you mean i should be able to see the differences through the
browser immediately.Till now i am stoping the server and redploying and then starting the server again , then i am able to see the differences thorough the browser.Be sure to use “Build automatically” (which you are) and use an exploded deployment for HotSync to be turned on.
Here do you mean use Exploded archive while deploying, and once in a while i get some error message called Hot code replacement won’t work.
Could you explain little more how can I turn on HotSync feature.
Riyad KallaMemberHere do you mean use Exploded archive while deploying, and once in a while i get some error message called Hot code replacement won’t work.
Could you explain little more how can I turn on HotSync feature.
Yes if you use “Exploded archive” when deploying, HotSync is enabled for you automatically. The changed .class files will be deployed immediately to your application server. Make sure your application server is setup to reload changes (Tomcat for example usually checks for changes ever 15 seconds). Each server is different, please check the documentation.
The error you are seeing about “HotSync failing” is a warning from the app server telling Eclipse that “too much of this class has changed for me to reload it successfully into the running application”. If that happens, what you can do is either restart the web application itself (from Tomcat you use the Tomcat Manager to individually start/stop/restart web applications indepdenednt on the server, again please see documentation on how to use this tool its quite handy) or restart the server.
If the “structure” of your class changes too much, you will likely get that warning about hotsync failed. However if you are only changing method contents and things of that nature, Hotsync replacement should work fine.
aannam01MemberThanks for the detailed explanation.I tested by changing some stuff , it is working.
Riyad KallaMemberGlad to hear it.
-
AuthorPosts