facebook

Some build questions and deployment [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #215582 Reply

    aannam01
    Member

    I 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

    #215588 Reply

    Riyad Kalla
    Member

    1) 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”

    #215594 Reply

    aannam01
    Member

    Thanks 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.

    #215605 Reply

    Riyad Kalla
    Member

    1)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.

    #215613 Reply

    aannam01
    Member

    So 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.

    #215616 Reply

    Riyad Kalla
    Member

    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.

    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.

    #215631 Reply

    aannam01
    Member

    Thanks for the detailed explanation.I tested by changing some stuff , it is working.

    #215632 Reply

    Riyad Kalla
    Member

    Glad to hear it.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Some build questions and deployment [Closed]

You must be logged in to post in the forum log in