I'm trying to use Parallel for loops from https://github.com/tantaman/commons. After importing the code to Eclipse, I get the error from the following function
public static String asURLSafeBase64String(UUID uuid) {
try {
return URLEncoder.encode(Base64Utils.trim(new sun.misc.BASE64Encoder().encode(UUIDUtils.asByteArray(uuid))), "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return "";
}
with the following error
Access restriction: The method 'CharacterEncoder.encode(byte[])' is not API (restriction on required library 'C:\Program Files\Java\jre1.8.0_25\lib\rt.jar')
I'm using Java 8 by the way. How can I resolve this error?