Gavril Posted June 26, 2006 Posted June 26, 2006 Hi, I am trying to execute a java program with a parameter from within FM8. I am only able to launch a .bat file using "Send Event" script step and monitor the execution in a DOS window. Is there more flexibility with "Send DDE Execute" script step? I would appreciate your help or some best practices to achieve something similar. Thank you, Gavril
Wim Decorte Posted June 26, 2006 Posted June 26, 2006 Forget about DDE. It's dead. You don't need a batch file to execute something. You can use the Send Event to it for you without the batch file: cmd /c yourApp.exe theParameter Notes: - "cmd /c" launches the Windows CLI and tells it to quit when the ocmmand is executed. With this you'll see the briefest flash of the "dos" box in the taskbar if you uncheck the "bring target application to the fron" in the Send Event script step - if the path to your app includes spaces, you need to wrap the path & executable in quotes.
Gavril Posted June 26, 2006 Author Posted June 26, 2006 Hi Wim, I feel I am closer to the solution now. My script has one line and looks like this: Send Event["aevt"; "odoc"; "cmd java.exe"] I get an open DOS Window but java.exe does not start. I am lunching the script from an FM8 Pro Advanced client to the FileMaker 8 Advanced server - on a different machine. If this works I am intending to tell java to execute from a .jar file ant send a parameter by embedding the parameter in the calculation. Our FM8 server machine has a java runtime engine. Do I have to wrap in a Windows executable somehow? Thank you again, Gavril
Gavril Posted June 26, 2006 Author Posted June 26, 2006 Wim, it works, thank you so much. The script line look like this: "cmd /k" & ¶ & "java -jar c:$execfm8_update_MySQl.jar " & test::text1 where text1 is a parameter. /k keeps the screen to monitor the processing. This is a nice FM8 feature. Thanks again, Gavril
Recommended Posts
This topic is 6767 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now