Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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

desktop_exl_promo_600x100_gdrp.png

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

4 Replies

Avatar

Level 10

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

Avatar

Level 7

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

Avatar

Level 4

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

Avatar

Correct answer by
Administrator

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