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?
Asked
Active
Viewed 302 times
1 Answers
0
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

Lakshan Dissanayake
- 521
- 1
- 4
- 18