Debugging J2EE Technology apps on JRun and Eclipse
Dr. B. | Monday, May 15, 2006
I'm currently using Eclipse 3.1.1 on Adobe (formerly Macromedia) JRun 4.0 for a database-intensive project update. In order to debug some complex Java class business logic, I wanted to run the JRun app inside Eclipse's debugger. Here's how you can set it up in a similar way:
1. Choose the project in Eclipse that contains the class files to debug
2. Make sure that the jrun.jar file is on your project's classpath
3. Choose Run -> Run...
4. Click the Java Application configuration, then the New button.
5. In the main class, enter "jrunx.kernel.JRun".
6. In the Arguments tab, enter "-start", so for a jrun server named "default" you'd enter "-start default".
7. Enter any JVM arguments you have in Jrun's jvm.config file into the VM arguments field: "-Xms32m -Xmx128m -Dsun.io.useCanonCaches=false".
You can then set breakpoints in your Java classes, and run JRun in Debug mode from within Eclipse during development.
One downside is that you can't debug JSP pages, only Java classes that you use. This application is a Flash Rich Internet Application that uses Flash Remoting to access a J2EE middleware backend, so I don't have to debug JSP for this one. I may review alternative debug methods that include JSP debugging later.
Doug Smith, Senior Developer, Barefoot
1. Choose the project in Eclipse that contains the class files to debug
2. Make sure that the jrun.jar file is on your project's classpath
3. Choose Run -> Run...
4. Click the Java Application configuration, then the New button.
5. In the main class, enter "jrunx.kernel.JRun".
6. In the Arguments tab, enter "-start
7. Enter any JVM arguments you have in Jrun's jvm.config file into the VM arguments field: "-Xms32m -Xmx128m -Dsun.io.useCanonCaches=false".
You can then set breakpoints in your Java classes, and run JRun in Debug mode from within Eclipse during development.
One downside is that you can't debug JSP pages, only Java classes that you use. This application is a Flash Rich Internet Application that uses Flash Remoting to access a J2EE middleware backend, so I don't have to debug JSP for this one. I may review alternative debug methods that include JSP debugging later.
Doug Smith, Senior Developer, Barefoot
0 comments
Post a Comment
« Home