[fpc-pascal] JNI/Android: Java events calling pascal code

leledumbo leledumbo_cool at yahoo.co.id
Tue Apr 22 11:02:08 CEST 2014

> My question is whether it is possible to hook 
into (as an example) the java media player events without writing java 
code. As for the opposite direction, calling the media player's Start 
method from pascal does not need any java code. 

If it can be done from C, then it can be done from Pascal as well. In fact,
the Java compiler frontend is written in C, which initializes JVM and then
call the Java compiler (which is written in Java). The problem now is that
you will have to initialize JVM yourself (which I don't have experience in)
and interact with the existing Java code from Pascal through JNI.

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/JNI-Android-Java-events-calling-pascal-code-tp5718988p5718991.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list