I do not know Eclipse, but I use Netbeans. Netbeans does this pretty well. The latest version even has the ability to automatically recompile when saving a java file.
I know that this does not exactly answer your question. You can probably use both Netbeans and Eclipse depending on which part of the project you are working on.
EDIT: With Tomcat, you can reload the web application. This is really only useful if Tomcat is looking at a new class. If your project is first compiled into the assembly directory and then a WAR is created, you can go into Tomcat and install the web application and instead of specifying the WAR point in the assembly directory.
In Tomcat, you may need to install a site configuration file under the name tomcat / conf / Catalina / localhost. The contents of this file are as follows:
<?xml version="1.0" encoding="UTF-8"?> <Context docBase="C:/Projects/MyWebApp/build/web" path="/MyWebApp"/>
Overload instructions here: http://www.cs.ucl.ac.uk/teaching/java/tomcatfaq.html#changeservlet
If you do this several times, though Tomcat will run out of memory. This is due to what is called PermGenSpace. Read about it if you want to know more. The solution is to increase the JVM memory, PermGenSize (with -XX: MaxPermSize) and finally restart Tomcat.
EDIT2: If reloading the application results in a logout, you can easily get a container for serializing session data to disk by adding "implements Serializable" to some of your classes. Then you will not need to log in after restarting the application.
Sarel botha
source share