Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
passing and getting parameters
preethi Ayyappan
Ranch Hand
Posts: 518
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am calling one
java
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?
Thanks.
Campbell Ritchie
Marshal
Posts: 79151
377
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
Rob Spoor
Sheriff
Posts: 22781
131
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Port not being released
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
Tomcat console window to be closed when browser window is closed
NoInitialContextException In EJB3.0with JBOSS
More...