473,549 Members | 2,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help needed in running a c++ program as Windows Services

We are running our c++ program, which uses JNI, as Windows services.
Program is getting CLASSPATH env variable correctly and also
initializes JVM successfully. After initializing JVM, programs makes a
JNI call FindClass() for getting java class.But FindClass method
returns NULL even though java class exists in the CLASSPATH.

Same program when is run from command window, FindClass method call is
working fine.

Is there any difference between running a program thru command window
and as a windows service ?
Incase you have any idea on how to resolve this issue, kindly get back
ASAP.
Jul 19 '05 #1
2 4943
parthan wrote:
We are running our c++ program, which uses JNI, as Windows services.


http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

--
Attila aka WW
Jul 19 '05 #2
"parthan" wrote on 13 Oct 03:
We are running our c++ program, which uses JNI, as Windows services.
Program is getting CLASSPATH env variable correctly and also
initializes JVM successfully. After initializing JVM, programs makes a JNI call FindClass() for getting java class.But FindClass method
returns NULL even though java class exists in the CLASSPATH.

Same program when is run from command window, FindClass method call is working fine.

Is there any difference between running a program thru command window and as a windows service ?
Incase you have any idea on how to resolve this issue, kindly get back ASAP.


Java and Windows are off-topic in this group. It would be better to
ask in a Windows group or a Java group that deals specifically with
native interfaces.

microsoft.publi c.win32.program mer.kernel deals with kernel issues and
should be able to describe the specifics of Windows services (be sure
to detail exactly what you're doing and on which OS: 9x/Me/NT and
version).

comp.lang.java. machine deals with elements of the Java Virtual
Machine, including native interfaces.

You'll probably need to go to both groups to get a complete answer.

Good luck,
Mike

--
Michael Winter
M.Winter@[no-spam]blueyonder.co.u k (remove [no-spam] to reply)
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4839
by: parthan | last post by:
We are running our c++ program as Windows services which uses JNI. > Program is getting CLASSPATH env variable correctly and also > initializes JVM successfully. After initializing JVM, programs makes a > JNI call FindClass() for getting java class.But FindClass method > returns NULL even though java class exists in the CLASSPATH. > > Same...
8
5457
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
13
3601
by: Siegfried Heintze | last post by:
I refered the engineer at my hosting service to http://support.microsoft.com/default.aspx?scid=kb;en-us;825738 where he tried to follow the directions there. He said there was no such file: Document settings\ServerName\ASPNET\Local settings\Temp I said it must be a typo, they meant to say c:\Documents And Settings\Server...
5
1520
by: Matthew Speed | last post by:
(About me: I know very little about writing server applications. I have done plenty of VB6 desktop app work but this is my first server program. I got it to work by modifying examples. I understand what it is doing but not much about what is involved in extending it. ) I am not necessarily looking for code examples here, just some...
5
2864
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason (other than the service being stopped) it would restart it. I have written the service to do just this, and for testing purposes I am running the...
10
1622
by: need.a.codemaster | last post by:
For a client of ours we are searching someone with the following knowledge Windows Virusscanners Spyware tools We need a windows application that runs in the background and for example changes the results from searchengines.
7
1685
by: Mike | last post by:
I'm having strange problems with IE7 just quiting when I open documents on some Sharepoint 3.0 Sites and I think it could be a asp.net issue. My Windows 2003 Server running IIS 6 and Windows Sharepoint Services 3.0 shows both ASP.NET 1.1 and 2.0 as options in the IIS Manager's ASP Net Tab. My Question is, should I uninstall asp.net 1.1
4
1367
by: ags5406 | last post by:
Hi All I have a task that I'm thinking about attacking in two different ways but don't know enough about Windows Services. First: We have a server application written in VB.net that acts as a middleman between various Fortan DLL's (the calculation engines) and various front end client applications (one in Java and two in
5
3280
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
7551
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7477
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7991
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6084
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5396
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5118
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1084
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.