1

The Java Language Specification states

A package can be stored in a file system (§7.2.1) or in a database (§7.2.2).

We're all familiar with packages stored in file systems, but I have not seen packages stored in a database.

Can anyone point me at a site discussing this more thoroughly than the above html? I'd like to understand the purposes, advantages, disadvantages, etc. Note, I'm asking about packages rather than the storage of object instances.

Mark Peters
  • 80,126
  • 17
  • 159
  • 190
Dean
  • 301
  • 4
  • 11

2 Answers2

0

The purpose should be obvious; it allows some flexibility in class definition without redeploying, gives external access to the classpath without having to be tied to the filesystem, etc.

Disadvantages are that it requires a database, a classloader (though a trivial one, as per this SO question and other references).

Beyond that you might need to ask a more-specific question.

Community
  • 1
  • 1
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
0

I think VisualAge for Java's storage system might have qualified as a database. IIRC, they called it the repository. I never knew how it was structured, but I'm pretty sure it wasn't hierarchal directories, as most implementations use. It was my understanding that they brought the repository from the Smalltalk product.

If someone can confirm or refute this, please do.

THE JLS authors wisely left the door open for implementations to innovate.

user371320
  • 1,388
  • 14
  • 23