Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to make a java program acceseble from other programs

Posted on 2002-03-04
6
Medium Priority
?
238 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

581 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