Search This Blog

Friday, February 3, 2017

hotswap jdk 8 with eclipse

Patch the jdk which is being used by your eclipse and your app server.

lets say jdk8

run the jar to patch the jvm

https://github.com/dcevm/dcevm/releases/download/light-jdk8u66%2B5/DCEVM-light-8u66-installer.jar


java -jar abovejar

use the altjvm option , it will create another folder in the jdk8 with name dcem



step2

download the hotswap agent which will go as a parameter in the app server start script. .e.g weblogic.


https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-0.3/HotswapAgent-0.3.zip



add this to java options of the start server

-XXaltjvm=dcevm -javaagent:/usr/local/hotswapagent/hotswap-agent.jar=autoHotswap=true


now restart the app server and develop your java project in eclipse using the same jdk.


Now click on run -- debug configuration and attach to the process of app server, you need to run the app server in debug mode with proper arguments in setDomain script for weblogic.




Thats it , change code compile in eclipse and its auto reflected in the target app server..

If you are working on an EAR deploy it normally from the console and check the location of exploded ear in the _WL_user folder inside tmp and locate your WARS and JARS over there.

Now change the JAR or WAR from archive to the folder keeping the name same.
Use the direct path of this folder in the build path of the eclipse project (Target folder for class files)

So if deployer has exploded your demo.ear in /domain/servers/tmp/_wluser/sdfd/demo.jar 


give this path in the output folder section on the java buld path of the project.




No comments:

Post a Comment