JDAPI         April  23 2006

Attach a plsql library example  (There is another example to attach an Object Library)

 

public class Class1
{
 public static void main(String[] args)
{
JdapiModule.openModule("c:\\SAJDI.FMB");

JdapiIterator fmbs = Jdapi.getModules();
FormModule fmb = (FormModule)fmbs.next();
JdapiIterator libs = fmb.getAttachedLibraries();



while (libs.hasNext())
{

AttachedLibrary lib = (AttachedLibrary)libs.next();
System.out.println(lib.getLibraryLocation());
System.out.println(lib.getLibrarySource());
System.out.println(lib.getName());


}
fmb.save("c:\\ammar.fmb");

// finally, free API resources
Jdapi.shutdown();
}
}

C:\jdev\jdk\bin\javaw.exe -ojvm -classpath C:\jdev\jdev\mywork\Workspace1\Project1\classes;C:\DevSuiteHome\forms90\java\f90jdapi.jar mypackage1.Class1
 

C:\ammarsajdi.pll      --- this is the library path
AMMARSAJDI   --- this is library name
Process exited with exit code 0.
 

Note: for some reason, if the library is attached without keeping the paht, the program does not detect the attached library. i posted a message on oracle OTN with this regard

an extensive example is submitted by Wilfred and published on his weblog. Wilfred says:

"I’ve put up the Forms converter for download at http://www.oratransplant.nl/files/convforms.zip
It all started out as a very small (hacked) project and grew over time. It grew much larger"

 

 

By Ammar Sajdi