Re: Is It Possible To Access Remote Classes?

From: FISH (joeking_at_merseymail.com)
Date: 12/01/03


Date: 1 Dec 2003 04:13:49 -0800

Hal Vaughan <hal@thresholddigital.com> wrote in message news:<hXmyb.258012$mZ5.1897311@attbi_s54>...
> I think I read something about this and I may just be using the wrong terms
> in search engines.
>
> I thought I read about a process where I could write Java classes that would
> be stored on a server (I think they had to be signed), and would be
> accessible to Java classes running on other computers. Is this possible?
[snipped...]

There are two possibilities here. I think I can guess which one you need,
but I'll mention then both just to be on the safe side.

Java can indeed fetch and use classes dynamically at runtime. The data
can arrive from anywhere (filesystem, network, etc) so long as it forms
a valid class format. This process is controlled by a 'class loader'
class, which you can write yourself if you need bespoke class loading
functionality - although there are a number of useful class loaders
already available.

Take a look at the Javadocs for java.lang.ClassLoader for starters.

The other possibility, probably not what you wanted - but I'll mention
it anyway, is RMI (Remote Method Invocation). RMI enables a piece of
software to call methods on objects which physically live on an entirely
different computer (or at least in a separate memory address space!) In
a crude sense, it enables a 'single' piece of software to run across a
network of computers, as if they were one giant single computer. However,
to share their objects computers need some form of RMI service running.

-FISH- ><>



Relevant Pages

  • RMI with multiple nic
    ... I'm writing a simple RMI application, ... Now I have two computers, ... I'm connected to Server 129.178.3.13 on port 1500 ... Caused by: java.net.ConnectException: Connection timed out ...
    (comp.lang.java.programmer)
  • How control RMI socket?
    ... I'm writing a simple RMI application, ... Now I have two computers, ... I'm connected to Server 129.178.3.13 on port 1500 ... Caused by: java.net.ConnectException: Connection timed out ...
    (comp.lang.java.help)
  • Is It Possible To Access Remote Classes?
    ... I thought I read about a process where I could write Java classes that would ... accessible to Java classes running on other computers. ... the user to edit settings, then sends the changed settings out through ... that applets can't read in the file on a user's system. ...
    (comp.lang.java)