作者deepblue0106 (开团北海道千层蛋糕)
看板java
标题[问题] 挂JCE时的安装问题也有关CLASSPATE
时间Tue May 8 20:05:50 2007
因为需要加解码而下载了JCE的套件 因为是新手有些安装方法不大懂
去找了类似的中文安装方法是:
简易安装把 jce1.2.1\lib 下的所有内容复制到 %java_home%\lib\ext下,如果没有ext目
录自行建立,再把jce1_2_1.jar和sunjce_provider.jar新增到CLASSPATH内
^^^^^^^^^^^^^^^
然後英文的安装方法:
The JCE 1.2.2 framework and the "SunJCE" provider are supplied as extensions
(also known as "optional packages") to the Java 2 platform.
The lib subdirectory extracted in the previous step contains the jce1_2_2.jar
and sunjce_provider.jar files. The lib subdirectory should also contain JAR
files for jurisdiction policy files: US_export_policy.jar and
local_policy.jar.
Two types of installations are supported, described below. In both cases, the
jurisdiction policy files must be installed in the same directory as that
which contains the JCE 1.2.2 framework JAR file. In some cases, permissions
must be granted to the JCE 1.2.2 framework and/or the "SunJCE" provider for
when applets or applications using JCE are run while a security manager is
installed. Note: There is typically a security manager installed whenever an
applet is running, and a security manager may be installed for an application
either via code in the application itself or via a command-line argument.
Instructions: To make the JCE 1.2.2 framework an installed extension, move or
copy the jce1_2_2.jar, US_export_policy.jar, and local_policy.jar files from
the lib subdirectory extracted in the previous step to the standard place for
the JAR files of an installed extension:
<java-home>\lib\ext [Win32]
<java-home>/lib/ext [Solaris]
Here <java-home> refers to the directory where the runtime software is
installed, which is the top-level directory of the JRE or the jre directory
in the JavaTM 2 SDK software. For example, if you have J2SDK v 1.2.2
installed on Solaris in a directory named jdk1.2.2, you need to install the
JAR files in the following directory:
jdk1.2.2/jre/lib/ext
Similarly, if you have JavaTM 2 Runtime Environment v 1.2.2 installed on
Solaris in a directory named jre1.2.2, you need to install the JAR files in
the following directory:
jre1.2.2/lib/ext
To also make the "SunJCE" provider an "installed" extension, move or copy
sunjce_provider.jar to that same directory for installed extensions. If you
want to make the "SunJCE" provider a "bundled" extension
然後我执行我的JAVA档案会出现:
SecretWriting.java:4: package java.crypto does not exist
import java.crypto.*;
^
谢谢大家看了这麽长的文章请大家帮忙要怎麽设定和操作 感激不尽^^b
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.229.111.153