Susan creates a keystore database named susanstore that has an entry for a newly generated public and private key pair with the public key in a certificate.
A JAR file is signed with the private key of the creator of the JAR file and the signature is verified by the recipient of the JAR file with the public key in the pair. The certificate is a statement from the owner of the private key that the public key in the pair has a particular value so the person using the public key can be assured the public key is authentic. Public and private keys must already exist in the keystore database before jarsigner can be used to sign or verify the signature on a JAR file.
In her working directory, Susan creates a keystore database and generates the keys:
keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
'keytool' is not recognized as an internal or external command,
operable program or batch file.
Originally posted by Hui Zhao:
It is in the same folder as the project. It works well by using NetBeans.
However when I create the JAR file, it doesn't display any thing even I double click the JAR file except the errors message above.
To compile a project, package, or file in the IDE, select it in the Projects window and do one of the following:
In the main menu, choose Build > Build Main Project (F11) to build the main project. Alternately, you can click the Build button in the toolbar.
In the main menu, choose Build > Clean and Build Main Project (Shift-F11) to clean and build the main project. Alternately, you can click the Clean & Build button in the toolbar.
In the Projects window, right-click the project node and choose Build Project to build the project.
In the Projects window, right-click the project and choose Clean Project to clean the project.
In the Projects window, right-click the package and choose Compile Package (F9) to compile a package.
In the Projects window, right-click the file and choose Compile File (F9) to compile a file. Alternatively, choose Build > Compile File (F9). Note that if you are using a free-form project, this command is disabled by default. You have to write an Ant target for compiling the currently selected file in the IDE and map it to the Compile File command.
file = new RandomAccessFile("larger_plotdata.bin", "r");
DataInputStream in = new DataInputStream(new FileInputStream("larger_plotdata.bin"));
I get error "null"