Home  >  Article  >  Java  >  What should I do if java cannot find the jar?

What should I do if java cannot find the jar?

藏色散人
藏色散人Original
2020-04-11 10:23:564155browse

What should I do if java cannot find the jar?

#java What should I do if I can’t find the jar? The solution to the jar package cannot be found

1. Right-click the project-"Properties-"Java bulk path-"jre System Library-"access rules-"resolution select accessible, fill in ** below and click OK! ! !

Recommended tutorial: "java learning"

2. When writing Java code in MyEclipse, a certain jar is used, import sun.misc.BASE64Decoder.*; But MyEclipse prompts:

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

Solution 1:

Just remove the JRE System Library in the project build path, then add the library JRE System Library, and everything will be normal after recompiling.

Solution 2:

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

The above is the detailed content of What should I do if java cannot find the jar?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn