Windwows NT Services using Java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Baas_Mannarasala
Posted On:   Tuesday, April 24, 2001 10:56 PM

I am developing a message server program in Java in Windows 2000.It uses CORBA as the backbone and Oracle as the database. Hence it uses java libraries from oracle as well as omg. Here are my doubts. 1. I want to run the program as a service in Windows NT/2000 so that it starts up as the system boots up. (It does not require 100 % portability)Is it possible? How? 2. I also want to run the CORBA NameService like this before the server program starts up. Is it possible? 2. Normally, we can run java programs from the MSDOS command prompt as C:java myclass This requires the command prompt to be taken. Is there any other way in which the DOS cmd window does not appear? 3.Is there any way to make java program an .ex   More>>

I am developing a message server program in Java in Windows 2000.It uses CORBA as the backbone and Oracle as the database. Hence it uses java libraries from oracle as well as omg.
Here are my doubts.
1. I want to run the program as a service in Windows NT/2000 so that it starts up as the system boots up. (It does not require 100 % portability)Is it possible? How?
2. I also want to run the CORBA NameService like this before the server program starts up. Is it possible?
2. Normally, we can run java programs from the MSDOS command prompt as
C:java myclass
This requires the command prompt to be taken. Is there any other way in which the DOS cmd window does not appear?
3.Is there any way to make java program an .exe program?

   <<Less

Re: Windwows NT Services using Java

Posted By:   Raphael_Couto  
Posted On:   Tuesday, June 5, 2001 02:20 PM

1 - Use JNI to start the Java VM and load your startup class (wrote in C). Write a NT Service.


2 - In the "loader" (it's a NT Service), specify the dependencies for your Service.


1,2,3 - If you look the file src.jar (Winzip can open), in JDK, exists a file named java.c, that can be an example how to load a java class in C using JNI.


3 - If you don't want DOS box, use a Win32 App e not Win32 Console App.



4 - To make a java to exe: you will use gcc (GCJ and GCC) to convert java to native, or use JNI to load JVM and your class.
About | Sitemap | Contact