RRy
RRy

Reputation: 453

unable to use javapackager command

I am using ubuntu 16.04, and my java is in /usr/bin/java and jdk is in /usr/lib/jvm/java-8-openjdk-amd64 . non of these had the javapackager inside. I am not able to use javapackager command and do not know how to configure it to use in command-line. Can anyone help me? Thanks.

Upvotes: 2

Views: 1652

Answers (2)

Henrik Johansson
Henrik Johansson

Reputation: 19

It seems javapackager comes with a package called openjfx, so running apt install openjfx should make the tool available for you, among your other java tools.

$ apt-file search javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/bin/javapackager
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/javapackager.1.gz
openjfx: /usr/lib/jvm/java-8-openjdk-amd64/man/man1/javapackager.1.gz

Upvotes: 1

r007
r007

Reputation: 304

You should define your java path.

You can set your JAVA_HOME in /etc/profile as Petronilla Escarabajo suggests. But the preferred location for JAVA_HOME or any system variable is /etc/environment.

Open /etc/environment in any text editor like nano or gedit and add the following

JAVA_HOME="/usr/lib/jvm/open-jdk" (java path could be different)

Use source to load the variables, by running this command:

source /etc/environment Then check the variable, by running this command:

echo $JAVA_HOME

Upvotes: 0

Related Questions