[fpc-devel] New FPC target: JVM

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Aug 25 23:06:55 CEST 2011


On 25 Aug 2011, at 22:38, Sven Barth wrote:

> But for now I have the problem to convert the class files provided by the SDK into Pascal units using javapp. I have unpacked the android.jar to $somedir/android and also copied javapp.jar there (just to be sure that there are no path problems ^^). I cd'd into that directory and issued the following command to convert the android.app namespace:
> 
> java -jar javapp.jar -protected javapp.jar android.app.
> 
> The output is the following:
> 
> default charset: UTF-8
> Determining short Pascal class names...
> Indexing classes under android/app/Activity...
> Indexing classes under javapp/jar...
> Printing classes...
> Done!
> 
> The result is a "java.pas" and a "java.inc". The first includes the latter and the latter is empty.
> 
> So what am I doing wrong? (The same happens if I try to use the android.jar instead)

You have to pass "-classpath path/to/android.jar" (or "-classpath ." if you extracted android.jar in the current directory) as parameter to javapp (not as parameter to java!). I've added this fact to http://wiki.freepascal.org/FPC_JVM/Building#Building_javapp

So:
  java -jar javapp.jar -classpath android.jar -protected javapp.jar android.app.


Jonas


More information about the fpc-devel mailing list