Category Archives: Java

Solution to Java program unable to find valid certification path to requested target

On macOS sierra, some Java program encountered error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Popular google answer suggested to use keytool to add certificate to $JAVA_HOME/jre/lib/security/cacerts.This solution probably works on other OS … Continue reading

Posted in Java, Uncategorized | Tagged | Leave a comment

Java and .NET

Java annotation vs .NET metadata

Posted in .NET, Java | Leave a comment

C++ call java.util.HashMap

//============================================================================ // Name        : usejavahashmap.cpp // Author      : Onega // Description : C++ call java.util.HashMap // JNI Doc: http://download.oracle.com/javase/6/docs/technotes/guides/jni/index.html // g++ -I/usr/lib/jvm/java-6-openjdk/include -I/usr/lib/jvm/java-6-openjdk/include/linux -O0 -g3 -Wall -c -fmessage-length=0 -v -MMD -MP -MF”src/usejavahashmap.d” -MT”src/usejavahashmap.d” -o “src/usejavahashmap.o” “../src/usejavahashmap.cpp” // g++ -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/server/ -v … Continue reading

Posted in CPP, Java, JNI | Leave a comment