---
title: "Access restriction: The constructor SunJCE() is not accessible"
author: "RYAN.D"
date: "2012-07-06T16:53:48Z"
tags: []
categories: ["Web前端"]
slug: "access-restriction-the-constructor-sunjce-is-not-accessible"
draft: false
lastmod: "2012-07-06T16:54:04Z"
id: 1561905
url: "https://ryan-d.iteye.com/blog/1561905"
---

在搭建项目环境时出现了以下编译错误：

Access restriction: The constructor SunJCE() is not accessible due to restriction on required library J:\\jdk\\jre\\lib\\ext\\sunjce\_provider.jar  
访问限制：由于J:\\jdk\\jre\\lib\\ext\\sunjce\_provider.jar库的限制，SunJCE() 构造函数不可访问。

在网上搜了一下，解决办法是修改编译选项，方法如下：Window -&gt; Preferences -&gt; Java -&gt; Compiler -&gt; Errors/Warnings -&gt; Deprecated and restricted API -&gt; Forbidden reference (access rules) -&gt; Warnings或者Ignore即可。