File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
passing and getting parameters
Joined: Oct 04, 2007
Aug 13, 2008 23:12:00
I am calling one
standalone application from another standalone application like the following
Class c=Class.forName("Ivr"); Object obj=c.newInstance(); Ivr h=(Ivr)obj; h.service(request,channel);
I want to pass and get parameters in both the application.Is it possible in standalone application?
Joined: Oct 13, 2005
Aug 14, 2008 04:05:00
Are you running two JVMs?
Do a search on JavaRanch; that sort of question comes up about every two weeks. Lots of possibilities:
You could connect the two together with Sockets.
You could create a class to embody data and serialise its instances from one application and deserialise them into the other application.
You could have a text file with data in, writing and rewriting it from the different applications.
Joined: Oct 27, 2005
Aug 14, 2008 10:56:00
I have a question for you.
Your code obviously recognizes class Ivr. Yet you still use reflection to create an instance. Why?
First of all, why use Class.forName if Ivr is available; therefore Ivr.class is also available. That will return the same as Class.forName("Ivr").
Second of all, why not say
Ivr h = new Ivr(); h.service(request,channel);
That's a) a lot better to read, and b) faster.
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: passing and getting parameters
Port not being released
Tomcat console window to be closed when browser window is closed
Not able to read XML file from dependent project
How to store an XML file as a string in database and retrieve in Java code
NoInitialContextException In EJB3.0with JBOSS
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013