Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java in Java

Thread Tools

Java in Java

Roedy Green
Posts: n/a
On Fri, 08 May 2009 09:13:40 -0700, Mark Space
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>Dirk Bruere at NeoPax wrote:
>> Is it possible to download a Java app (applet etc?) and run it inside a
>> desktop Java app?

If you know the name at compile time, you just invoke the method as
if it were part of the original program. Just make sure the jar is on
the classpath.

If you don't know the name, and you just have a String you concocted
at run time, you can use Class.forName and newInstance. See

If you don't even know the method names and parameters at compile
time, you need to use reflection.
Roedy Green Canadian Mind Products

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, “How would I develop if it were my money?” I’m amazed how many theoretical arguments evaporate when faced with this question.
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hot Requirements: 1.Sr Java Developer,2.Java Developer (Java with EJB) Isaac Java 0 01-20-2011 08:41 PM
hey i am just started java,, can anyone tell me the use ,application, why java , importance of java.. manish sahu Java 3 02-14-2008 12:00 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
JAVA VIRTUAL MUCHINE OR SUN JAVA Fernando Kohan Firefox 1 11-14-2004 02:04 AM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM