Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of Base64 class in JDK7

Tags:

java

I am trying to use Base64 class in JDK 7 but I am getting the error:

Base64 cannot be resolved

Why does eclipse throw this error?

I am using the code below:

byte[] imageData = Base64.getDecoder().decode(readFile(imagePart.getInputStream()));

even import statement also shows the same error : import java.util.Base64;

Is this class not available in JDK 7?

like image 956
Shiladittya Chakraborty Avatar asked Dec 26 '15 07:12

Shiladittya Chakraborty


1 Answers

From the documentation:

Since: 1.8

So no, it is not available in JDK 7.

like image 114
Henry Avatar answered Oct 20 '22 19:10

Henry