• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

can RMI download jar instead of classes  RSS feed

Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am going through Sun's RMI tutorial, when it comes to deployment, it says to extract the jar file and put the classes in a network accessiable directory. I am just curious to know whether I can put the jar file in my directory and expect everything works.

My guess is that it does not since the tutorial specifically said to extract classes out of the jar file. I am just wondering why Sun could not go a step further, since they allow jar in CLASSPATH, why not allow jar files in RMI download, that would save us from extracting all classes and then copying it over.

Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't put the JAR file in the network accessible directory (called the "codebase")... you have to *make* the JAR file the codebase (i.e. point at the JAR file itself instead of the directory it is in). You can look at the bottom example in section 5.0 of the Dynamic code downloading using RMI tutorial for how this would look.
You've gotta fight it! Don't give in! Read this tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!