#250 How to execute pod file directly from java or .net?

shvets Fri 20 Jun 2008

I can execute *.fan file as script from the java:

"C:\>java -cp c:\dev\fan\lib\java\sys.jar -Dfan.home=%fan_home% fanx.tools.Fan script.fan"

I want to do same with *.pod file. How to do it?

andy Fri 20 Jun 2008

You should be able to just pass in the pod name:

C:\>java ... fanx.tools.Fan script.fan         // execute script.fan
C:\>java ... fanx.tools.Fan myPod              // call myPod::Main.main
C:\>java ... fanx.tools.Fan myPod::MyType      // call myPod::MyType.main
C:\>java ... fanx.tools.Fan myPod::MyType.foo  // call myPod::MyType.foo

EDIT: Take a look at the doc for Fan

EDIT 2: Running Fan like this under .NET isn't supported yet, so you'll have to use the FanLauncher and configure your env to be .NET

Login or Signup to reply.