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.
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