A browser with JavaScript enabled is required for this page to operate properly.
Documentation

The Java™ Tutorials
Trail: Security Features in Java SE
Lesson: Implementing Your Own Permission
Section: Putting It All Together
« PreviousTrailNext »

The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
See Dev.java for updated tutorials taking advantage of the latest releases.
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.

Steps for the HighScore Developer (Chris)

The steps Chris would take, after creating the HighScore and HighScorePermission classes, are:

Compile the Classes

javac HighScore*.java -d .

Place the class files in a JAR File

jar cvf hs.jar com/scoredev/scores/HighScore*.class

Create a Keystore and Keys for Signing

keytool -genkey -keystore chris.keystore -alias signJars

Specify whatever you want for the passwords and distinguished name information.

Sign the JAR File

jarsigner -keystore chris.keystore hs.jar signJars

Export the Public Key Certificate

keytool -export -keystore chris.keystore
 -alias signJars -file Chris.cer

Supply Files and Information Needed by Game Developers and Users

That is, supply them

  • the signed JAR File hs.jar,
  • the public key certificate file Chris.cer, and
  • information as to the permissions the HighScore and HighScorePermission classes must be granted in a policy file in order to work. For this, Chris could supply the exact grant entry needed.
« PreviousTrailNext »

Previous page: Putting It All Together
Next page: Steps for the ExampleGame Developer (Terry)

AltStyle によって変換されたページ (->オリジナル) /