Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running java from CFEXECUTE

Status
Not open for further replies.

jdaniels

Technical User
Apr 23, 2002
63
GB
Can I run java classes from CFEXECUTE? Here is the code I have, and the output:

<cfexecute name=&quot;java \path\to\MyClass&quot;</cfexecute>

It doesn't seem quite right to me, as I am not sure whether 'java' is the application and the class name is its argument, and that is what should be executing. Anyway, when I run this code, I get the following error:

____________________________________
An exception occurred when invoking an external process.
The cause of this exception was that: java.io.IOException: CreateProcess: java \path\to\MyClass error=2.
____________________________________

Subsequently I tried this:

<cfexecute name=&quot;java&quot; arguments=&quot;\path\to\MyClass&quot;></cfexecute>

And got the same error.

Am I missing something? The java class works fine on its own, and I am using CFMX Server on Win2000.

Regards,

Jonathan Daniels
 
PS the first line of cf code is this:

<cfexecute name=&quot;java \path\to\MyClass&quot;></cfexecute>

I did close the first cfexecute angle bracket. The Java executable is in my path variable.

JD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top