I have a java program (1 .java file and 2 .class files) that I am trying to run. I was told to use the command "java Downloader [-file filename] [-log log-file] [-host hostname] username password GMAT-program-code" to run it. This works fine in the command prompt. But when I try to run it in the command prompt through coldfusion, it does nothing. I don't get an error, but it also doesn't create any files/logs as it should. I tried many variations, including:
<cfexecute name="#datadrop#\Downloader\jre1.5\bin\java.exe" arguments="java Downloader *username* *password* *test*" outputFile="#logs#\thisone.txt"></cfexecute>
<cfexecute name="C:\Windows\System32\cmd.exe" arguments="c/ downloadscript.bat" outputFile = "filename.txt"></cfexecute>
<cfexecute name="C:\Windows\System32\cmd.exe" arguments="c/ cd Downloader/src & Downloader *username* *password* *test*" outputFile = "#logs#/filename.txt"></cfexecute>
I did some googling, and most documentation shows to do this is by using cfobject. I placed the 2 classes in the classpath folder and tried to implement this by doing:
<cfobject action="create" type="java" class="Downloader" name="pvdl">
<cfset pvdl.username="*username*">
<cfset pvdl.pword="*password*">
<cfset pvdl.test='*test*'>
This errors out and says: The following information is meant for the website developer for debugging purposes. Error Occurred While Processing Request USERNAME
Can anyone help me in getting this program running? The preferred method is to use the command line.
Thanks.