Hello.
There is a hypra-simple way to convert all your fpc applications into Java applications !
It is working for
all fpc console-applications.
Here how to do (using the fpGUI demo /fpGUI/examples/gui/filedialog.lpr).
The original fpc program:1) Change:
program filedialog;
{$mode objfpc}{$H+}
into =>
library filedialog;
{$mode objfpc}
2) Change:
procedure MainProc;
into =>
procedure MainProc(PEnv: pointer; Obj: pointer); cdecl;
3) At end, add:
exports
MainProc name 'Java_filedialog_mainproc';
end.
=> compile that new fpc library.
The Java application.public class filedialog {
public static native void mainproc();
public static void main(String[] args)
{
System.loadLibrary("filedialog");
mainproc();
}
}
Save it as
filedialog.java in same directory.
And to run the Java application, do, in terminal :
java -Djava.library.path=. filedialog
And... IT WORKS ;-) see that :=>
>>
https://sites.google.com/site/fiensprototyping/fpgui_java.jpgFred.