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.
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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.