I need to set up my java application on the server. is there any way to set up the java environment on production which is provided by asdf?
To use java which is provided by asdf, I had to locate the installation dir of the specified version and set the environment variable in the service configuration.
get the installation location
asdf where java openjdk-15.0.2
and then set the path as an environmental variable
Environment="JAVA_HOME=/home/ubuntu/.asdf/installs/java/openjdk-15.0.2"
ExecStart=/home/ubuntu/server/bin/server