• Post Reply Bookmark Topic Watch Topic
  • New Topic

import classes from server  RSS feed

 
Mike Ferrando
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
I was wondering if it is possible to import classes from a remote server over the internet.

My thinking was that this may aid client side applications for my java programs.

With XSLT I can use valid XML documents over the internet from any workstation which makes life much easier for setup and run.

I am new to Java, so maybe I am missing something that really deals with this. I guess setting the environment variables and all can be a bit hairy, etc.

Mike Ferrando
Washington, DC
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not exactly sure what you're trying to do. If you're talking about including remote files in the classpath when compiling, then no, that's not possible. If you're talking about running your own application, then you could add a ClassLoader to it that retrieves classes (or jar files) from wherever you can get them. This article may be a starting point for some research if you want to go down that road.
 
Mike Ferrando
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
I'm not exactly sure what you're trying to do. If you're talking about including remote files in the classpath when compiling, then no, that's not possible. If you're talking about running your own application, then you could add a ClassLoader to it that retrieves classes (or jar files) from wherever you can get them. This article may be a starting point for some research if you want to go down that road.


Ulf D.,
I am looking over the URL you sent.

I guess I was thinking that I could centrally control my classes in one place (upgrade, enhance, extend, etc.) instead of attempting to do this one workstation at a time.

However, I guess the bigger question is will it work if multiple users are attempting to actuate these classes at the same time.

Mike Ferrando
Washington, DC
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at Java Web Start.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, I guess the bigger question is will it work if multiple users are attempting to actuate these classes at the same time.

Concurrent access will be no problem, as access to these files will be read-only.
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URLClassLoader
 
Mike Ferrando
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
Thanks much for your help.

Java Web Start and URLClassLoader both look good.

At this early stage learning Java, I wanted to know if it was possible, i.e. part of the design of the programming language.

Mike Ferrando
Washington, DC
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!