cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Application from Webdynpro

Former Member
0 Kudos

hello all,

for a future project i need to execute applications from a webdynpro project, loading documents of various types. this code is just for testing purposes...:



java.lang.String szCmd = "rundll32 SHELL32.DLL,ShellExec_RunDLL";
java.lang.String szFile = "c:\\example.doc";
	  
java.lang.Runtime run = Runtime.getRuntime();
	  
try
{
	Process proc = run.exec(szCmd+szFile);
}
catch (IOException e)
{ 
	throw new WDRuntimeException(e.getMessage());
}

i've also tried calling the applications directly, giving the document as parameter eg.



java.lang.String szWord = "c:\\program files\\microsoft office\\office11\winword.exe";
java.lang.String szFile = "http://somewhere.net/some.doc";

java.lang.Runtime run = Runtime.getRuntime();

try
{
	Process proc = run.exec(szCmd+" "+szFile);
}
catch (IOException e)
{ 
	throw new WDRuntimeException(e.getMessage());
}

well, referring to the task manager, it works. but the executed application is initially hidden. is there a way to make it visible? or is it possible to create the application object using ole/createobject/getobject mechanisms?

thanks for your help in advance.

regards,

chris

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Why you need to do this from Webdynpro?

Why not a simple java class that runs in the server.

Regards

Ayyapparaj