Skip to main content
Level 4
Jul 19, 2016 8:03 PM UTC
Solved

How to start AEM 6.2 in debug mode by clicking on jar file

Hi All,

I want to modify my aem installer jar file, such that when I click on it start in debug mode by default.

I know the process to start AEM in debug mode by adding required JVM params in start.bat file as below

::* default JVM options if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx2048m -XX:MaxPermSize=512M -Djava.awt.headless=true  -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30302'

To modify my jar I unzipped it, inside which I found one folder called static inside which I found bin folder with start.bat and quickstart.bat I added similar JVM param but when I try to connect my eclipse it does not connect properly with AEM and thus I think it never started properly in debug mode.

So if anybody know where i can add these debug param in my jar file so that when i start the server by clicking on jar file it start in debug mode.

Thanks,

Shehjad

​

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Jul 20, 2016 5:43 AM UTC

Hi 

Workaround to open jar with debug option on double clicking are:-

Option 1. Right click the jar to create a shortcut.

    Right click the Shortcut created and insert the command-line parameters in Target after the full path.

Example:- C:\..\cq-quickstart-6.2.0.jar -<options>

Now use this shortcut for running jar in Debug mode.

 

Option 2. Create a script which will open the jar in debug mode.

 

I hope this will help you.

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni

4 replies

Lokesh_Shivalingaiah
Level 10
Jul 19, 2016 11:43 PM UTC

You cannot start in debug mode by clicking on jar.

Option 1: As you mentioned, unzip update the .bat file and start it

Option 2 : Start AEM via command prompt and pass the same properties via argument

Translate
Tuhin_Ghosh
Level 8
Jul 20, 2016 1:07 AM UTC

Once you have started the AEM in debug mode, as mentioned by Loki please follow the steps mentioned in the below link to set remote debug in eclipse.

https://helpx.adobe.com/experience-manager/kb/CQ5HowToSetupRemoteDebuggingWithEclipse.html

 

Thanks

Tuhin

Translate
Level 4
Jul 20, 2016 4:32 AM UTC

Thank you all for your answers. I am aware how to modify the start.bat file inside crx-quickstart folder which gets generated when we click on the jar. But here what I want to do is to unzip the jar which will have folders as shown in the image modify some script which i expected to be some property file or bat file. Zip the jar again and then click on the jar again, when i click on the jar it should start in debug mode, as loki said if that is not possible then it is other matter.

Kind regard,

Shehjad

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Jul 20, 2016 5:43 AM UTC

Hi 

Workaround to open jar with debug option on double clicking are:-

Option 1. Right click the jar to create a shortcut.

    Right click the Shortcut created and insert the command-line parameters in Target after the full path.

Example:- C:\..\cq-quickstart-6.2.0.jar -<options>

Now use this shortcut for running jar in Debug mode.

 

Option 2. Create a script which will open the jar in debug mode.

 

I hope this will help you.

 

Thanks and Regards

Kautuk Sahni

Translate
Kautuk Sahni