Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 02, 2008 at 02:19 PM

    Hi,

    Why you need to do this from Webdynpro?

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

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded