Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have to access a .net desktop application from my java web based application is it possible then how solution is required it is very urgent

hoping that i get some response quickly
Posted
Comments
Ashraff Ali Wahab 13-Sep-12 10:09am    
WebService is the answer.
Dylan Morley 20-Sep-12 10:08am    
On the same machine? Or, do you mean 'web based application on Server A' wants to access program on some remote client machine?

If so, think about why that would be problematic, the security issues involved etc.

1 solution

You can call any executable from Java using Runtime class and starting a process for running that executable file.

Java
try
   {
    Runtime rt = Runtime.getRuntime();
    String exepath="D:\\yourapp.exe";
    Process p = rt.exec(exepath);
    \\TO DO
    p.destroy() ;
    }
catch(Exception exc){
    /*handle exception*/
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900