creating a basic skeleton to invoke an AM in Java Class in Oracle ADF

Here is a very cool way of quickly creating a basic skeleton to invoke an AM :

1) Create a Test java class.

2) Inside the mail class, type in keyword ‘bc4jclient’ :

package model;

public class Class1 {
public Class1() {
super();
}

public static void main(String[] args) {
Class1 class1 = new Class1();

bc4jclient
}
}</blockquote>
<div></div>
<blockquote>

3) Press Ctrl + Enter.4) Voila!! A small skeleton to invoke AM gets created:

package model;

import oracle.jbo.*;
import oracle.jbo.client.Configuration;
import oracle.jbo.domain.*;
import oracle.jbo.domain.Number;

public class Class1 {
public Class1() {
super();
}

public static void main(String[] args) {
Class1 class1 = new Class1();

String amDef = "test.TestModule";
String config = "TestModuleLocal";
ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
ViewObject vo = am.findViewObject("TestView");
// Work with your appmodule and view object here
Configuration.releaseRootApplicationModule(am, true);
}
}