How to read a file in java?

Use below snippet and try .   public String readFile(String fileWithPath) throws IOException{ FileInputStream inputStream = new FileInputStream(fileWithPath); String readTotalFile = null; try { readTotalFile = IOUtils.toString(inputStream); } finally { …

How to read a file in java? Read More

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Root cause 1:  Due to low access permissions. Root cause 2:  Different Java JDK versions path in eclipse.ini. Example:- In eclipse.ini file :- eclipse.vmargs=-Djavax.net.ssl.trustStore=C:\Program Files\Java\jre1.8.0_162\lib\ eclipse.vm=C:\Program Files\Java\jre1.8.0_74\bin\ Check below things …

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty Read More