我正在尝试从 Haxe 调用外部 Java 函数。如何调用从 Haxe 编写的 Java 函数?
Java代码:
public class ExternalClass{
public static String myFunction(){ //this will be invoked from Haxe
return "External Java function";
}
}
Haxe主类:
class Main
{
public static function main()
{
trace(myFunction()); //how can I properly access this Java method?
}
}
Haxe 外部课程:
extern class Test
{
public static function myFunction():String;
}