cancel
Showing results for 
Search instead for 
Did you mean: 

CMC -SDK program object java

0 Kudos

Hello,

i want to understand how using java program objects with BO XI 3.1 (hp unix).

1/ Can we add this program java in CMC and schedule it, without having to copy other file or library in the BO web server ?
this would be great, not having to access to web server, only using CMC to deploy the program.

2/ How adding a java program ?
a sample detailed should help me.
what do i have to put in classpath ?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

aasavaribhave
Advisor
Advisor
0 Kudos

here is a template java class for creating java program object

import com.crystaldecisions.sdk.framework.*;

import com.crystaldecisions.sdk.occa.infostore.*;

public class hello implements com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase

{

      public void run(IEnterpriseSession oEnterpriseSession, IInfoStore oInfoStore, String args[])

      {

            // your code here

      }

}

It must extend IProgramBase interface and implement method run. Furst test it outside BOE. Then pack it into a jar file. Publish the jar file to enterprise as java program object. You don't have to specify anything in classpath, unless you use som external\3rd party classes that this program object references. You need to provide class name, hello in this case to run and then schedule the program object. All the program job server does it , it launches java.exe to run your code As long as it can successfully launch it, it reports the status as success.

Check SAP KBA 1501932

0 Kudos

thanks,

when you write 'You need to provide class name, hello in this case to run' what does it mean ?

aasavaribhave
Advisor
Advisor
0 Kudos

undre program object properties there is a parameter tab which has a field: class to run

it is name of the java class than implements run method. So if you java program object class is:

public class MyClass implements com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase

{

      public void run(IEnterpriseSession oEnterpriseSession, IInfoStore oInfoStore, String args[])

      {

            // your code here

      }

}

The class to run would be "MyClass" because it is the class that implements run method.

Hope that helps.

aasavaribhave
Advisor
Advisor
0 Kudos

inside program object properties there is a parameter tab which has a field: class to run

it is name of the java class than implements run method. So if you java program object class is:

public class MyClass implements com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase

{

      public void run(IEnterpriseSession oEnterpriseSession, IInfoStore oInfoStore, String args[])

      {

            // your code here

      }

}

The class to run would be "MyClass" because it is the class that implements run method.

Hope that helps.

0 Kudos

thank you, i will try and will ask if i have some troubles.

i don't find SAP KBA 1501932, do you have a link ?

denis_konovalov
Active Contributor
0 Kudos

moved to Java SDK forum