[問題] 掛JCE時的安裝問題也有關CLASSPATE

看板java作者 (開團北海道千層蛋糕)時間18年前 (2007/05/08 20:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
因為需要加解碼而下載了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
文章代碼(AID): #16G6UVqx (java)
討論串 (同標題文章)
文章代碼(AID): #16G6UVqx (java)