· Mar 22, 2022

load and compile from java

Hi i am trying to load and compile one class from java . I am following this code. I am using iris 2021.2


             irisConnection = (IRISConnection) DriverManager
                     .getConnection("jdbc:IRIS://", "username", "password");
             iris = IRIS.createIRIS(irisConnection);
             iris.classMethodStatusCode("%SYSTEM.OBJ", "Load", "/filePath/SumanPramodTest.test3.CLS.xml","/displaylog=0 /displayerror=0");


When i am passing cuk  or ck in qspec param , i am getting error . but when i pass "/displaylog=0 /displayerror=0" it does not throw an error but does not compile the class too. 


Any leads would be of great help  .

Discussion (5)1
Log in or sign up to continue

There is a project that will be available soon (don't ask me to define "soon") that will allow the Java programmer to load and compile sources from the local system into an IRIS Server. The IRIS Server does not need to be running on the same system where the files are located.

This example is slightly old as the current implementation of load() returns a list of items loaded and compile() returns a list of items compiled. There are load implementations that accept directories, individual files, any Java streamable, and also JAR files.

SourceLoader sourceLoader = new SourceLoader(connection);
Path path = Paths.get("path/to/samples/cls/Sample");
sourceLoader.load(path, null);