The lack of access to the bin directory would seem to suggest that the Java code should be compiled first, so I overrode the compile() and swapped the order that compileFan and compileJava methods are called in so that the Java code is compiled first.
But this gives the exception:
Exception in thread "main" sys::UnknownPodErr: FantomFX at fan.sys.UnknownPodErr.make(UnknownPodErr.java:25) at fan.sys.UnknownPodErr.make(UnknownPodErr.java:22) at fan.sys.Pod.readFPod(Pod.java:161) at fan.sys.Pod.doFind(Pod.java:67) at fan.sys.Pod.find(Pod.java:46) at fanx.tools.Jstub.stub(Jstub.java:40) at fanx.tools.Jstub.run(Jstub.java:160) at fanx.tools.Jstub.main(Jstub.java:186)
And, an unknown Pod would seem to imply that the Pod needs to be present before the Java code can be called.
So, do we have a chicken and egg situation?
Just how do you compile a Pod that has Java code and Fantom code, where the Fantom code uses the Java code ?
brianWed 27 Jun 2012
Java FFI does not current support accessing Java code within your own pod. You can compile native peer Java code in fan.<your pod> package. But Java FFI requires that the Java code be cleanly packaged up into its own pod with a dependency.
geo Wed 27 Jun 2012
I'd like to know how to build a Pod that contains Fantom and Java code, where the Fantom Code uses
using [java]
the Java code.When I use a standard build script I get the following exception:
The lack of access to the
bin
directory would seem to suggest that the Java code should be compiled first, so I overrode thecompile()
and swapped the order thatcompileFan
andcompileJava
methods are called in so that the Java code is compiled first.But this gives the exception:
And, an unknown Pod would seem to imply that the Pod needs to be present before the Java code can be called.
So, do we have a chicken and egg situation?
Just how do you compile a Pod that has Java code and Fantom code, where the Fantom code uses the Java code ?
brian Wed 27 Jun 2012
Java FFI does not current support accessing Java code within your own pod. You can compile native peer Java code in
fan.<your pod>
package. But Java FFI requires that the Java code be cleanly packaged up into its own pod with a dependency.