• 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

import classes from server

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at Java Web Start.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
URLClassLoader
 
Mike Ferrando
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic