I have install java jar packing by using this command
java verison (1.8)
CLASSPATH=.:/path/to/bcmail-jdk16-144.jar:/path/to/bcprov-jdk16-144.jar:$CLASSPATH
export CLASSPATHwhich is required as part of dependency to execute one of java class file
but it is giving below error
pkcs7gen.java:8: error: package org.bouncycastle.cms does not exist
import org.bouncycastle.cms.CMSProcessableByteArray; ^
pkcs7gen.java:9: error: package org.bouncycastle.cms does not exist
import org.bouncycastle.cms.CMSSignedData; ^
pkcs7gen.java:10: error: package org.bouncycastle.cms does not exist
import org.bouncycastle.cms.CMSSignedDataGenerator; ^
pkcs7gen.java:51: error: cannot find symbol CMSSignedDataGenerator sgen = new CMSSignedDataGenerator(); ^ symbol: class CMSSignedDataGenerator location: class pkcs7gen
pkcs7gen.java:51: error: cannot find symbol CMSSignedDataGenerator sgen = new CMSSignedDataGenerator(); ^ symbol: class CMSSignedDataGenerator location: class pkcs7gen
pkcs7gen.java:53: error: cannot find symbol sgen.addSigner(privateKey, myPubCert,CMSSignedDataGenerator.DIGEST_SHA1); ^ symbol: variable CMSSignedDataGenerator location: class pkcs7gen
pkcs7gen.java:60: error: cannot find symbol CMSSignedData csd = sgen.generate(new CMSProcessableByteArray(dataToSign),true, "BC"); ^ symbol: class CMSSignedData location: class pkcs7gen
pkcs7gen.java:60: error: cannot find symbol CMSSignedData csd = sgen.generate(new CMSProcessableByteArray(dataToSign),true, "BC"); ^ symbol: class CMSProcessableByteArray location: class pkcs7gen
Note: pkcs7gen.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
8 errorsAnd also how install java jar package using Linux terminal
1 Answer
It does appear that you have a problem in that the system cannot find the source as directed in the file. However, one does not normally "install" a jar file.
I would suggest that you first make sure you have the latest java and java runtime engine packages installed. You need the first to program and the second to run a java program on your computer.
Then you should be able to download the jar file and use it appropriately.
Hope that helps.