简体   繁体   English

如何在 MacOS Sierra 上为 JRE 8 安装 JCE?

[英]how to install JCE for JRE 8 on MacOS Sierra?

I want to install https://github.com/cryptomator/cli which requires: JRE 8: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html JCE: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html我想安装https://github.com/cryptomator/cli ,它需要:JRE 8: http : //www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html JCE: http: //www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

On my Mac, Preferences > Java, Java tab, I see Platform 1.8, Product 1.8.0_121, and a path of 1.8 1.8.0_121 http://java.sun.com/products/autodl/j2se /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java在我的 Mac 上,首选项 > Java,Java 选项卡,我看到平台 1.8、产品 1.8.0_121 和 1.8 1.8.0_121 的路径http://java.sun.com/products/autodl/j2se /Library/Internet Plug- Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

So I think I have JRE 8 already.所以我想我已经有了 JRE 8。 How do I tell if I have JCE, and how do I install it properly if it is not there?我如何判断我是否有 JCE,如果没有,我该如何正确安装它?

You need to copy .jar files downloaded from here您需要复制从这里下载的 .jar 文件

https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

and paste it into Java Home dictonary:并将其粘贴到 Java Home 字典中:

<java-home>/lib/security 

In my case Java Home is here:就我而言,Java Home 在这里:

/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre

Take note that lib folder should be inside jre folder cause .../Home/ has lib folder too请注意lib文件夹应该在jre文件夹内,因为.../Home/也有lib文件夹

Here are the installation instructions:以下是安装说明:

1) Download the unlimited strength JCE policy files. 1) 下载无限强度 JCE 策略文件。

2) Uncompress and extract the downloaded file. 2) 解压并解压下载的文件。

This will create a subdirectory called jce.
This directory contains the following files:

    README.txt                   This file
    local_policy.jar             Unlimited strength local policy file
    US_export_policy.jar         Unlimited strength US export policy file

3) Install the unlimited strength policy JAR files. 3) 安装无限强度策略 JAR 文件。

In case you later decide to revert to the original "strong" but
limited policy versions, first make a copy of the original JCE
policy files (US_export_policy.jar and local_policy.jar). Then
replace the strong policy files with the unlimited strength
versions extracted in the previous step.

The standard place for JCE jurisdiction policy JAR files is:

    <java-home>/lib/security           [Unix]
    <java-home>\lib\security           [Windows]

It was apparently explained in the README.txt where you can get it after you downloaded the zip file(jce_policy-8.zip).它显然在 README.txt 中有解释,您可以在下载 zip 文件 (jce_policy-8.zip) 后获取它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM