站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java Tutorial 5.0 英文版

Compile and Run the Program - Java Tutorial 5.0 英文版

The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Security in Java 2 SDK 1.2
Lesson: Generating and Verifying Signatures

Compile and Run the Program

Here (in a .java source file) is the complete source code for the VerSig.java program, with some comments added.

Compile and run the program. Remember, you need to specify three arguments on the command line:

  • The name of the file containing the encoded public key bytes

  • The name of the file containing the signature bytes

  • The name of the data file (the one for which the signature was generated)
Since you will be testing the output of the GenSig program, the file names you should use are
  • suepk

  • sig

  • data

Here's a sample run; the bold indicates what you type.

%java VerSig suepk sig data
signature verifies: true

Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.