Reputation: 9
I tried to create a jar file with command
jar cfm ProductSalePerCountry.jar Manifest.txt SalesCountry/*.class
and i got
The program 'jar' can be found in the following packages:
* default-jdk
* fastjar
* gcj-5-jdk
* openjdk-8-jdk-headless
* gcj-4.8-jdk
* gcj-4.9-jdk
* openjdk-9-jdk-headless
also I am unable to use nps
command. Currently I have jdk1.8.0_131 installed in my ubuntu 16.04. Please suggest to resolve the issue.
Upvotes: 0
Views: 405
Reputation: 4741
If you want to go with Oracle Java, then you can follow http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/ for easy install. This will set all paths and functionality to use.
Upvotes: 0
Reputation: 75406
Even though you followed instructions on how to install Oracle Java, you are using one provided by Ubuntu. The default here is just to install java
and not any of the tools (like jar or javac) present in the Java Development Kit. The simplest solution is just to install one in Ubuntu.
sudo apt install openjdk-8-jdk
This will install the OpenJDK flavor of Java which is slightly different from Oracle Java, but not in ways that matter at your current level.
Upvotes: 1