Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Execute Application from Webdynpro

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

Former Member
Not what you were looking for? View more on this topic or Ask a question