Lots of Java ADF enthusiasts have asked for some guidance on working with Eclipse. I do teach them a few in the class but here is more comprehensive listing. Obviously you can find more info on the web but here is a list that is relevant to using Eclipse for web development.
1. Increasing the heap size of Eclipse (In simple terms : how to avoid out of memory errors)Two ways to deal with this issue :
- Start Eclipse with an extra argument to the VM indicating the memory size
eclipse -vmargs -Xmx512M - Edit the eclipse.ini file (located in eclipse home directory) and add the modify the vmargs values. Here is a sample
Old:
-vmargs
-Xms40m
-Xmx256m
New:
-vmargs
-Xms40m
-Xmx756m
2. How to get the intellisense for code completion.
Ctrl + Space bar
3. When deploying the application to Tomcat, sometimes you get an error saying the “JRE was not found”
- From the Menu items open the “Window” -> “Preferences”
- Select the “Server” -> “Installed Runtimes” option
- Select “Apache Tomcat” and click on “Edit” button
- In the window make sure you choose a valid JRE. Click on the “Finish” button.
4. What plugins do I need to start using Java ADF with Eclipse?
There is detailed documentation on how to install Java ADF plugins for Eclipse on EDN. Here is the link :
http://edndoc.esri.com/arcobjects/9.2/Java/java/engine/ide_integration/eclipse/EclipseInstall.html
Here is a screenshot for reference showing all the plugins (including Java ADF plugins) installed in my Eclipse :
5. When you run the web mapping application template you get this error in the console though the application runs fine java.io.NotSerializableException: com.esri.adf.web.tasks.MapToolsTaskInfo
The reason is that the container (Example: Tomcat) tries to serialize the objects in session. Add a new context.xml file inside the META-INF folder of you app. Put these lines inside the xml file:
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
Thats It folks! Save and run the app.
More coming soon …






March 27, 2008 at 9:48 am
Good thread, i like this tips :)
April 11, 2008 at 2:01 am
Sathya, can you write something about debugging ArcObjects using Debuging plugin recently released by ESRI. How to use, how to debug using immediate window etc etc..