`
836811384
  • 浏览: 548053 次
文章分类
社区版块
存档分类
最新评论

Spring tool suite编译不通过:Access restriction: The type XXX is not accessible

 
阅读更多

一、发现问题

通过jaxb操作xml,引入javax.xml.bind相关包时,spring tool suite编译不通过。

二、分析原因

Spring tool suite就是eclipse上套了一层spring的插件,本质还是eclipse。Eclipse默认把某些受访问限制的API设成了ERROR。,所以会编译不通过。


三、解决问题

方法1:

把对某些限制API的级别设置为warning

Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning。

方法2:

在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常。

方法3:

工程上右键->工程属性->ja。va builder path->Libraries标签,点击JRE System Library里面的Access rules,add sun/** 为accessible,如果该项存在,就edit。

方法4:

Windows -> Preferences -> Java -> Installed JREs -> 选择用的JDK -> Edit -> Add External JARs。


四、总结

我实验了前两种方法,可以实现。还有一些方法是参照网上的,请大家自己试一试。

参考地址:http://blog.sina.com.cn/s/blog_6714fba70100x6mz.html


分享到:
评论

相关推荐

    sun.misc.base64decoder.jar下载

     Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program  files\java\jre6\lib\rt.jar  Access restriction : The constructor BASE64Decoder() is ...

    import com.sun.image.codec.jpeg.JPEGImageEncoder;包的下载

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要...

    java识别验证码.docx

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要把...

    解决eclipse导入rt包问题

    在Eclipse中处理图片,需要引入两个包: ...Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 解决方法就在这里

    Universal-USB-Installer

    running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). ...

    A restriction of the fourier transform

    the restriction theorem

    支持32和64位的Jpcap.dll

    说明部分dll文件中有多个目录分别表示多个系统专用文件 ...Please feel free to contact the legal owner of the file regarding the copyright and the restriction in use for more information.

    BlueToolInstall

    except where such Software is embedded in a manner not readily accessible to the end user. Licensee acknowledges that any symbols, trademarks, BASLA v1.1 5/29/02 -1- tradenames, and service marks ...

    英飞凌单片机烧写软件

    DAS Version: DAS v3.0.0 Date: 2010-04-12 ...For SPD a device connection is only established if the miniWiggler is using a high speed USB 2.0 port. JTAG and DAP are not affected by this restriction.

    Sortable前端框架

    unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering. This option sets the minimum pointer movement that must occur before the delayed sorting is ...

    应用程序限制器 - App Restriction v2.6.0

    App Restriction是一款可以定期清理后台应用,释放内存,节省电池电量的系统清理优化神器。 现在的流氓应用越来越多,动不动就常驻后台,杀还杀不掉,消耗内存,消耗电池。 这个工具专杀流氓应用,并且定期清理它们...

    spring-security-csrf:一个示例应用程序演示了在 Web 应用程序中使用 Spring Security CSRF 保护而不使用 Spring Security 的身份验证和授权功能

    2014Permission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the "Software"), to deal in theSoftware without restriction,...

    51CTO下载-DSSM335V4.part1

    Note: If the Demo does not start, be sure that the Demo Configuration Editor is not running and there are not any other demos running. If you copied the demo package directory, make sure the DSSM_335...

    spring-boot-rest:Spring Boot的JSON和XML服务

    1.简介 这是一个示例应用程序,演示了如何使用Spring Boot构建REST风格的服务,该服务可以使用单个控制器类同时为JSON和XML...Software without restriction, including without limitation the rights to use, copy,

    A restriction theorem for the quaternion Heisenberg group

    四元数Heisenberg群上的限制性定理,刘和平,王迎占,本文中,我们证明了在四元数Heisenberg群上,如果1<=p=<3/4,那么相对于sublaplacian 的限制性算子是Lp到Lp'有界的。这不同于我们已知的Heisenbe

    Progress/OpenEdge语言手册

    However, if at run time the passed dynamic temp-table schema does not match the schema of the static temp-table parameter, the AVM raises an error.” The following sentence refers to run-time actions...

    SQL Server Data Access Components 2.45.22 for d6

    [SQL Server] <-> [OLE DB] <-> [Client application]Using SQL Server Data Access gives you the following advantages: - No distribution, installation and configuration is required for BDE and ODBC;...

    NGUI Next-Gen UI v3.0.6

    - FIX: Drag handles will now hide if there is not enough space to draw them. - FIX: Anchors and stretch scripts set to "run only once" will still respond to screen size changes. - FIX: Switching panel...

    spring-vue-mongo-crud:Spring&Vue&MongoDB CRUD操作

    Spring-Vue-Mongo-Crud Spring&Vue&MongoDB CRUD操作 ...in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and

Global site tag (gtag.js) - Google Analytics