Expand my Community achievements bar.

AEM as a cloud service Local set up

Avatar

Level 2

Java Version - 11.0.19

AEM as a cloud Version - aem-sdk-2023.9.13665.20230927T063259Z-230800

When I use the Command line to start the AEM Jar, I am getting below error:

Error: Unable to access jarfile aem-author-p4502.jar. 

But when I double click the instance is started successfully.

As per the Adobe documentation we need to start instance by using the command prompt not by double clicking the jar.

How do I resolve the issue when starting the instance via command prompt

Command used : java -jar aem-author-p4502.jar

 

14 Replies

Avatar

Level 5

Hi @Shwetha1994 

Please verify if you are running the command from correct location, i.e, if the path from where you are running command contain the jar file and you have access to it.

 

If above check are fine and you still get this error, try running the command prompt with admin access.

Avatar

Level 2

I am running the command in correct location, I also tried with run as admin as well

 

 

Avatar

Community Advisor

Hi @Shwetha1994 - After extracting the jar file ,did you renamed your jar to  aem-author-p4502 ? When you extract the zip file the default name of jar is aem-sdk-quickstart-version.jar where version varies. You have to first rename it to aem-author-p4502 and then run the command

Avatar

Level 2

yes, after extracting I have renamed it to aem-author-p4502.jar and then ran the command

Avatar

Community Advisor

You can begin by unpacking the JAR file and then initiate AEM using the /bin/start command.

java -jar aem-author-p4502.jar -unpack <!-- crx-quickstart folder will be created -->

sh ./crx-quickstart/bin/start <!-- Start AEM -->

For Windows, you should use "start.bat," and for Linux and MacOS, you can use simply "start" to AEM instance.

Avatar

Community Advisor

@Shwetha1994 

The error message "Error: Unable to access jarfile aem-author-p4502.jar" typically indicates that the command prompt or terminal could not locate the AEM JAR file you're trying to execute. To resolve this issue, you need to ensure that you're running the java -jar command from the correct directory and that the JAR file exists in that directory.

 

Use below command by running command prompt as admin.  

java -jar aem-author-p4502.jar

 

or 

java -jar /full/path/to/aem-author-p4502.jar

 

But I really doubt if adobe document suggested to run jar only from command prompt. In windows you can double click the jar and run it, but when you are done setting up the instance successfully. Stop the instance and restart AEM instance from start.bat file at below location. 

<location>\jarfile\author\crx-quickstart\bin

 

 

Avatar

Community Advisor

@Shwetha1994 

 

Your user should has permission to execute it from command prompt.

 

Addition to that, in command prompt, check if you can see the jar listed in current directory.If now, try switching to to the right directory within command prompt and execute your command again.

 

Hope it helps!!

Avatar

Community Advisor

Hello @Shwetha1994 

 

To start an AEM SDK instance in Author mode, you need not update the jar name.

- You can just extract the SDK. The directory should look like:

aanchalsikka_0-1696496539207.png

- Just copy over the jar into a new folder

- Open command line. GO this this folder path

- Start AEM with java -jar <Name of the jar file> . Example

 

aanchalsikka_1-1696496664574.png

 

 

 


Aanchal Sikka

Avatar

Administrator

@Shwetha1994 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 2

once its resolved, i will mark the answer as correct.

Thanks!