Ensures that the current working thread is attached to the Java VM. It operates as follows:
The java_vm_attach() function is called implicitly in each of the other VSEs, and also when allocating, copying or deleting a Virtuoso/PL reference to a Java VM object values.
If the Java VM is already initialized and the classpath is supplied it will throw a SQL error. If the Java VM is not initialized, but it is required to execute a statement the server will implicitly call java_vm_attach (NULL);. The Virtuoso Java VM integration binary works with JDK 1.2 and later.
This example initializes the Java VM by supplying a classpath of: CLASSPATH=/usr/local/virtuoso/classes:/usr/local/jakarta-tomcat-3.3.1/lib/tomcat.jar and sets the tomcat.home Java system property to /usr/local/jakarta-tomcat-3.3.1 It is the equivalent of executing JDK/JRE 1.2 unix java tool using: java -cp /usr/local/virtuoso/classes:/usr/local/jakarta-tomcat-3.3.1/lib/tomcat.jar -Dtomcat.home=/usr/local/jakarta-tomcat-3.3.1
java_vm_attach ('/usr/local/virtuoso/classes:/usr/local/jakarta-tomcat-3.3.1/lib/tomcat.jar', vector ('-Dtomcat.home=/usr/local/jakarta-tomcat-3.3.1, 0);