I managed to call the pragma on the driver via JNI interface. If anyone needs this, I will post the code in few days.
During the coding, I found it simpler to add the jdbc jar to the classpath before starting the virtualmachine, instead of using classloader etc. Is there any drawback to this ?