I have a spring boot app that is running well on AWS Linux VM. Now, I am trying to run it on Azure Linux VM.
I am launching the application using this command (just like I am doing on AWS):
java -Dspring.profiles.active=prod -jar /home/azureuser/myapp/myapp-server.jar
But nothing happens after this. It doesn't exit but there is no output/log message at all. Ideally, I should see output generated on the shell but it prints nothing. There is no error/exception stack trace.
The same jar is working fine on AWS Linux VM.
The only difference in my AWS and Azure VMs is that on AWS, I have Java 16:
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment Corretto-16.0.2.7.1 (build 16.0.2+7)
OpenJDK 64-Bit Server VM Corretto-16.0.2.7.1 (build 16.0.2+7, mixed mode, sharing)
while on Azure VM, I have Java 17:
openjdk version "17.0.4.1" 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40354 (build 17.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40354 (build 17.0.4.1+1-LTS, mixed mode, sharing)
But I have tested the jar on my local windows machine on Java 17 and it works fine.
Any idea what might be the issue? Is the output going somewhere else that I don't know about?