Configure JRebel with Jboss 4.3.2.GA - java

I am trying to configure JRebel to be used with my currently existing Java EE application on JBoss 4.3.2.GA and Eclipse Ganymede .
I am following http://manuals.zeroturnaround.com/jrebel-reference-manual/server.html?source=eclipse-config#server-4.6.11.
But it says to use command file instead of run.bat. Please provide some idea about how to implement the command line in the curently existing script run.bat

If you start the server from the IDE, you do not need to write your own script to start the container with JRebel. Instead, you can just click JRebel checkbox in the server configuration tab, as shown in https://manuals.zeroturnaround.com/jrebel/ide/eclipse.html#server-configuration

Related

Deploy java web application to Tomcat with Visual Studio Code

I'm trying to deploy a java web application to Tomcat using Visual Studio Code and I'm having some issues that I'd like to share.
After installing the extension Tomcat for Java, I've tried to deploy a Maven Java Web project. To do so, I've clicked over project's folder and selected "Run on Tomcat Server" option. The result is an error with this message: The folder is not a valid web app to run on Tomcat Server.
Then, I've realized that maybe I should create a war file before running it on Tomcat. Therefore, I've executed mvn clean package command and afterwards execute "Run on Tomcat Server" option over the war file. Doing this the project has been deployed correctly.
However, compared to Eclipse's way to work with Tomcat, it seems to me a bit tedious. Particularly if I'm working with static files, like css or js, because every time I modify a file I should execute mvn clean package and "Run on Tomcat Server". Whereas, in Eclipse, these files are deployed automatically on Tomcat without restarting.
I wonder if there is another way to work with VS Code and Tomcat for Java.
Thanks!
If you use Spring, there is an easy way.
The Spring Initializr extension comes with an embedded Tomcat installation, and hot reloading works out of the box.
Rely on the following guide to install it:
https://code.visualstudio.com/docs/java/java-spring-boot

How to run VisualVM Eclipse Plugin

I am trying to run Visual Plugin in Eclipse Juno. Visual VM usage instructions are confusing. Running my application on Tomcat server and I have no idea how to point it to Visual VM.
Usage Instructions:
Create a new application configuration
Choose the "VisualVM Launcher" as the application launcher
Run/Debug the application with the created configuration to have VisualVM started automatically.
How would I choose Visual VM Launcher for my application which is running on Tomcat?
The VisualVM plugin for Eclipse is only useful when you can start the application from within Eclipse (i.e. when it's a plain Java application, not Tomcat or something that is to be deployed in Tomcat).
In your case, just start jvisualvm (which you can find the same folder as javac) and select the Tomcat process in the dialog.
Note that you may have to configure Tomcat to allow VisualVM to connect.
Alternatively, you can create a launch config for Tomcat but to do this, you will have to read the startup files, collect all JARs that have to go into the classpath manually and correctly, collect startup parameters, use the correct "current directory", set a couple of system properties ... it's possible but you probably don't want to try.

How to test web project from eclipse to jboss as7 without mvn jboss-as:deploy

My firm is change the development environment, looking for some tricks and tips on how to work in the new environment.
The current environment is Eclipse and Tomcat. We are developing web applications with Spring, Web Flow, and MySQL..
The new environment is going to be Eclipse, Jboss AS7 and Maven.
Question 1:
Now for the questions as the current time we run tomcat on the local workstations and I can use eclipse to write my code and then just click on “Run On Server” and eclipse will build the war file and start tomcat.
With the new environment it does not look like Eclipse can start and stop and depoy right to Jboss AS so we are running a command line: mvn jboss-as:deploy does anyone know a better way?
Question 2:
Debugging.. Does anyone know how to get debugging working with eclipse and jboss as7
1) You can use "Run On server" with JBoss As 7 just like you do it with Tomcat. Just add new server in Eclipse for JBoss As. One difference comparing to adding new server for Tomcat is that during new server definition you should also create new runtime Environment for JBoss (if you haven't done this before) but this is very easy and intuitive. And there is a lot of examples in internet.
2) Debug is working with JBoss As very good too. If you start server from eclipse, then you can use debugger like you have used it before for Tomcat. If you run your server from command line without Eclipse, you can use remote debug from eclipse (as I remember Dubug as.. -> Remote Java Application and then specify there project, host and port).

How to deploy Java project to Tomcat

I have downloaded a sample extjs+mysql+spring web project (link) with a java backend that I'd like to set up locally on my machine. I have installed Tomcat server, and MySQL DB but it's my first time ever with a java-based web application and I have troubles setting it up. Does it require any modifications ? I thought that .jsp files should be included there, but I can only see .java sources. Do I need to build it before it's ready for deployment ? Any help appreciated.
This is an Eclipse project so you'd need to run it from within Eclipse.
Download Eclipse
Open the project in it
Define a Tomcat container in your Servers tab
Drag and drop the project onto the newly defined Tomcat
Run it
if your are using eclipse IDE for development, create a project in eclipse,
run as "run on server" , and set the running server (eg TOMCAT 7).
and thats it,,
make sure, you correctly setup spring project in IDE with all needed jar files .

MaintainJ with "Sysdeo Eclipse Tomcat Launcher plugin"

I am using eclipse with tomcat server plug in from the "Sysdeo Eclipse Tomcat Launcher plugin".
Now i want use Maintainj with my configuration(Sysdeo Eclipse Tomcat Launcher plugin) please help me to configure any one.
Thanks.
Add MaintainJ.war to the Tomcat and follow the instructions of the wizard. After Step 2, you will see the instructions to add to the server classpath and to the JVM arguments. You will have to manually do those changes to complete MaintainJ's configuration.

Categories