Programs / Importing modules |
The IMPORT JAVA instruction imports Java™ module elements.
IMPORT JAVA classname
Using IMPORT JAVA classname, you can import and use a Java class.
The name specified after the IMPORT JAVA instruction is case-sensitive.
The CLASSPATH environment variable defines the directories for Java packages. See the Java documentation for more details.
Actually classname must be a path with package names separated by a dot, so the actual syntax for IMPORT JAVA is:
IMPORT JAVA [ packagename . [...] ] filename
It is allowed to write several IMPORT JAVA instruction with the same class; Compilation will succeed to mimic the Java import rules. However, you should avoid this:
IMPORT JAVA java.util.regex.Matcher IMPORT JAVA java.util.regex.Matcher