I am currently developing an MVC Application using Java EE Technologies and Eclipse as an IDE. To run my server and deploy my application I am using ANT. I would like to know how can I debug my Java Code through the ant tool or eclipse.
Add the following jvmarg options to your tomcat start command:
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n"/>
You will be able to attach the Eclipse debugger on port 5000, using the Remote Java Application debug category.
You can do that from eclipse:
enable debug on tomcat
create a new debug configuration in eclipse that connects to tomcat
See here for details.
But it is not a good idea to use ant to start tomcat in development. Use Eclipse WTP to start your tomcat and deploy applications on it.
Related
I have a server that it has weblogic on its own. I develop my program with intelliJ. Can I connect intelliJ to the weblogic server and just run and deploy the project from intelliJ (just like when we use Tomcat application server on our local and start/stop that with intelliJ)?
You indeed can. You can create a Run/Debug configuration for WebLogic same way as for Tomcat, but you might see it as an option only after you click N items more (irrelevant), which is at the very bottom of the list.
Also, this is supported only in Ultimate edition. If you're using community edition, you can't do that from the IDE.
The process of configuration is also described in Intellij IDEA's guides
Currently I am deploying my Java Spring code using JBoss server. What I am doing each time I do a change to code is
build the project using mvn clean install
Copy created war file to \wildfly-10.1.0\standalone\deployments
Deploy using $ ./standalone.sh --debug 8787
This works fine but the procedure is too long. Is there a method easier than this using Intellij IDE or another method.
sorry i have no idea with Intellij and JBoss,
but with Maven project you should try JBoss Devstudio Red Hat JBoss Developer Studio
it's free and is Eclipse extended
you will can run instantly and debug your java code directly.
I have created an Java app on openshift platform with JBoss Application Server 7 and MySQL 5.5 using eclipse and Jboss Openshift Tools. Now I wannt to run this application on localhost but I am unable to find any option to do so.
I googled and followed some links and was able to create jboss-as-7.1.1 server but cannot figure out how to run the application using this server as there is not option to select a server in Run As window of eclipse. Do i need to modify anything in project settings?
Did you create a server adapter for your jboss-as-7.1.1 in Eclipse? I assume you did so it looks like your project is missing the required Eclipse WTP nature. Maven project (like any OpenShift Java app) get those for free if you have m2e-wtp installed. To me it looks like you're missing that one (and eventually possibly Eclipse m2e) and need to install it.
Either use the Eclipse marketplace or point Eclipse to the following update site:
http://download.eclipse.org/m2e-wtp/releases/luna/
I have a project that runs in JBoss EAP 6.0. However, it currently requires that a custom script (.bat) is run at startup.
This is possible in IntelliJ. When settings up a Run/Debug Configuration, a tab is provided titled "Startup/Connection" in which a "Startup script" can be targeted.
Eclipse is my preferred IDE but it does not appear to have this option. I have tried several things without any results.
I know in Eclipse, you can select which JBoss config file you choose to run on the Server view after you create a new Server config.
Alternatively, you can modify JBoss running scipt which will call your custom script.
Go to Eclipse Marketplace and try installing Jboss Tools and you should be able to start server and whole lot of other options.
Go to Help> Eclipse Marketplace and search "Jboss tools" and install the appropriate for your version of eclipse.
I have created a dynamic web application in eclipse helios i have install sysdeo tomcat plugin how to run my application using sysdeo plugin what are the setting needed please help me
BalusC: Just a note about why you might want to use Sysdeo. To the best of my knowledge, Sysdeo is still the only free way to hot-swap Java classes (not just JSPs) while using Tomcat inside Eclipse. There is JRebel and myEclipse, but neither of these are free.
I would try the steps listed in the article: Setting up the Sysdeo Tomcat Plug-in. They worked for me when I was figuring out how to configure things.