Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to make a java program acceseble from other programs

Posted on 2002-03-04
6
213 Views
Last Modified: 2010-03-31
In C++ it is possible to make at .DLL file and register it as at service. When registered the service runs at OS startup, and one can connect to it and call the public methods in the program from  e.g ASP source code.

I would like to do the same thing with at Java program, and connect to its public methods from both ASP and JSP source code. The program contains a datastructure and the public methods put(key, value) and get(key). I use multithreading and need to keep the datastructure in the RAM, not on the hard disk.

How do I make such a program available to other webprograms(what environmental wrapping should it have)?

0
Comment
Question by:Bjarke
6 Comments
 
LVL 3

Expert Comment

by:saxaboo
ID: 6839357
Hi,

is it some kind of registry you want to implement ?

In a 100% Java world, I would think about a RMI implementation (RMI = Remote Method Invocation = RPC mechanism for Java)

Now you apparently need VBScript (ASP) clients, and before even starting to begin to pre-think about writing a RMI client in VBScript I would preferrably think about other options ...

=> aren't web services a solution in that case ? Implement your "get/put" service as a web service (you can use Apache software foundation tools for this part)
Then call your web service from your JSP or ASP pages, in both cases you have freely available and easy-to-use APIs to do so (M$ SOAP Toolkit, for example, makes it easy to write VBScript web services consumers)

This is a path you could follow, among many others that our EE fellows will for sure mention.

Hope this high-level view helps,

-S
0
 
LVL 3

Expert Comment

by:saxaboo
ID: 6839370
Hi,

is it some kind of registry you want to implement ?

In a 100% Java world, I would think about a RMI implementation (RMI = Remote Method Invocation = RPC mechanism for Java)

Now you apparently need VBScript (ASP) clients, and before even starting to begin to pre-think about writing a RMI client in VBScript I would preferrably think about other options ...

=> aren't web services a solution in that case ? Implement your "get/put" service as a web service (you can use Apache software foundation tools for this part)
Then call your web service from your JSP or ASP pages, in both cases you have freely available and easy-to-use APIs to do so (M$ SOAP Toolkit, for example, makes it easy to write VBScript web services consumers)

This is a path you could follow, among many others that our EE fellows will for sure mention.

Hope this high-level view helps,

-S
0
 

Expert Comment

by:muhotrepius
ID: 6841155
When using JSP and ASP you usually have some kind of a container - jsp server or web server.
You want to use your class file on the server-side , right?
Tell us where you gona place your JSPs/ASPs ??
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 1

Expert Comment

by:skinsella
ID: 6841266
2 Questions here

1.  How do you run a java application in the background so that it starts up when the machine starts and isn't interrupted when a user logs in/out?

Answer: There are lots of programs that allow java programs to be installed as Windows Services.  My favourite is JavaService, a free product.  The URL and documentation is at the below address.  It's really not very hard to install services just be careful about the user that the service runs as and the permissions that that user has on the computer.

http://www.alexandriasc.com/software/JavaService/index.html

2. How can you write a java program that can expose it's services to ASPs and different languages running on a compuer.  The fact that the program is running as an NT service is irrelevant at this stage.  You should probably consider making the get() and put() services available over a common protocol - like HTTP.  You could use XML and do it as a web service, or use a proprietary format of your choice.  Other options might be CORBA, RMI etc. but HTTP is nicer.

-sk
0
 
LVL 35

Expert Comment

by:girionis
ID: 8658551
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0
 

Accepted Solution

by:
Chmod earned 0 total points
ID: 8735779
As recommended

Chmod
Community Support Moderator @Experts Exchange
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question