0

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?

Flux
  • 9,805
  • 5
  • 46
  • 92
Lakshan Dissanayake
  • 521
  • 1
  • 4
  • 18

1 Answers1

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