Home >Java >javaTutorial >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!