Base64 error: java.lang.NullPointerException at javax.xml.bind.DatatypeConverter.parseBase64Binary(DatatypeConverter.java:296)

Viewed 655

I get the error by running this simple main method:

public class Test {
    public static void main(String[] args) throws Exception {
        byte[] result =
                DatatypeConverter
                        .parseBase64Binary("some key");
    }
}

The answers I've managed to find are back from 2014 and advise to use Java 1.6, while I use Java 11.

0 Answers
Related