Technology Article

About Luster Packages

To Java or not to Java

Packages are something a Java programmer is very familiar with. With that in mind, it is important to realize that just because Luster and Java both have the concept of a package, does not mean they are the same thing. Luster's notion of a package is quite different from Java's, and how a programmer interacts with them is also quite different.

Always There

First of all, once a package is loaded it is always present and available to be used anywhere in an application. Let's assume we were using the luster.filesystem plugin. This plugin defines the luster.filesystem package which contains all of its definitions. Before that plugin is loaded none of the definitions are available to the program. After the plugin is loaded '''all''' of the definitions are available '''always'''. A programmer may access these features by using the fully-qualified name (e.g. luster.filesystem.File). This can be done without the use of the import keyword.

The only time the import keyword is necessary is when the programmer wishes to refer to classes without them being fully-qualified (e.g. File). Then the file would need to have

import "luster.filesystem.*"

appear sometime before the non-qualified names appeared.