Registering A DLL from my Java application.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siddharth_Arora
Posted On:   Monday, March 4, 2002 02:13 AM

Is there any way i can register a DLL on a windows 98/NT machine through my Java application?


When the application executes, it registers a DLL,(mydll.dll) in the machine it runs.


The DLL is residing also on the machine.


Please Help !!

Re: Registering A DLL from my Java application.

Posted By:   Duncan_Forster  
Posted On:   Tuesday, March 5, 2002 01:26 AM

Here you go -


public class RegisterCOM
{
public static void Register(String name) throws IOException
{
Runtime.getRuntime().exec("regsvr32.exe /s " + name);
}
public static void Unregister(String name) throws IOException
{
Runtime.getRuntime().exec("regsvr32.exe /s /u " + name);
}
}
About | Sitemap | Contact