Java

Why Java?

Java is installed on almost any computer, either when installing a browser or separatly.
Java is accessible in Php code providing Php is properly configured, and special features of Scriptol allow to use it in the same manner that other classes in Scriptol code.
By importing Java classes you can get access to components concerning virtually any field of the computer science and building a GUI, a graphical user interface.

You can download the last version of the Java SDK at http://java.sun.com
If you like the clear and powerful syntax of Scriptol, you can use it with Java object and Php function, and thus open the door of a vast world or resources.

Instances of Java classes

Once a Java class is imported (see next chapter), you declare instances and call methods exactly as you do for Scriptol classes.

If you declare your own Java classes, they must stay in separated files, and the files must have the name of the class with the java extension. It has to be compiled by javac. For example, the class MyClass must be stored into a MyClass.java file.

Examples:

java.awt.Dialog d      ` instance of the Java class Dialog
Dialog d                      ` idem
MySolClass m           ` instance of a Scriptol class
MyJavaClass jc         ` instance of a user class in Java



If "Dialog" is not delcared as a Scriptol classs, you can omit the path "java.awt".

Once the instance declared, it is used as any Scriptol object...

Examples:
d.setVisible(true)
m.disp()
print m.x