Executing a java class in Integrator

I have to execute a java class in Endeca Integrator. How must I go about doing this? Can i use the JavaExecute component? If yes, are there any examples of the syntax of this java class. The document states that the transformation attributes must implement a JavaRunnable interface. Can someone provide me examples of such a java class. Please help
Thanks

Take a look at this page in the Clover documentation: Help - Eclipse .  It has some details on the API methods of JavaExecute.

Similar Messages

  • How can I execute a java class with arguments from an air application built from mxml?

    I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
    java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
    where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
    How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

    Hi,
    You need to use Integration technology like BlazeDS or LCDS.

  • How to use URL class to execute a java class/app  on a remote machine?

    I am a beginner in Java networking and have a question about URL programming.
    How do I pass parameters to a java class/application over the web and then cause it to execute ? I then want to get the result back from the clas/app. The class/app resides on a remote machine and the protocol used is "http" protocol. OR all this is not possible through the URL and related classes ?

    How do I pass parameters to a java class/application over the web and then cause it to execute ? Using the HTTP protocl you can either perform a GET where the parameters are in the URL or a POST where the data is sent to the server with the request.
    The server must be setup as a web server to execute code based ojn a HTTP request. Using a web server with a JSP which contains the code to execute is the simplest way to do this.
    I then want to get the result back from the clas/app. The output of the JSP becomes in the data returned by the HTTP request.
    I would suggest looking for example on google.
    http://www.google.co.uk/search?q=java+http+request+tutorial
    Another option is to use RMI. The integration is tighter but it does not use the HTTP protocol.

  • Invoking command prompt & executing a java class from one more java class

    Hi,
    I have a problem with my application. I need to develop an editor which compiles and interpretes java programmes. I am develoopping it in Java (Swing and pure Java). I have no problem in compiling a java programme from my editor. But while execuing if any body writes a programme which has console input the system hangs. I am using Runtime.exec() method to call command prompt of Win'2000. My editor is working fine for the programmes written without console input in my editor. I want the same type of input acceptance as JCreator / Vim editors accept.
    How can i achieve this? Please give me some source code help for my requirement.

    When you create a Process object from executing a command you can grab it's input and output streams. Using these, and a text area, you can create a "virtual terminal" for your user to work with their console programs. The rest is just details :)

  • Problem while trying to execute Java class in JSP using  RunTime Class

    Hi,
    I want to execute a JAVA class through a JSP. For this I am using following code ....
    JSP (AAA.jsp) CODE ............
    try
    String[] cmd = new String[3];
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = "java -DPeBS_CONFIG_HOME=D:/CASLIntegration/PeBS/srcvob/PeBS/config Service_Statement_Application 22/May/2001 22/May/2003";
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1] + " " + cmd[2]);
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    catch (Throwable t)
    t.printStackTrace();
    StreamGobbler THread class Code ..........
    import java.util.*;
    import java.io.*;
    public class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    I have successfully compiled and placed the class file for the above class in JSP's servlet engine. However, when I execute the JSP through explorer Web Browser, I get following compile time error:
    An error occurred between lines: 36 and 86 in the jsp file: /casl/LocalApp/VehicleServiceStmt/AAA.jsp
    Generated servlet error:
    D:\Tomcat\work\localhost\_\casl\LocalApp\VehicleServiceStmt\AAA$jsp.java:118: No constructor matching StreamGobbler(java.io.InputStream, java.lang.String) found in class StreamGobbler.
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    ^
    An error occurred between lines: 36 and 86 in the jsp file: /casl/LocalApp/VehicleServiceStmt/AAA.jsp
    Generated servlet error:
    D:\Tomcat\work\localhost\_\casl\LocalApp\VehicleServiceStmt\AAA$jsp.java:121: No constructor matching StreamGobbler(java.io.InputStream, java.lang.String) found in class StreamGobbler.
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    I am unable to determine the reason of why the constructor which exists in the StreamGobbler Class is not recevied in JSP. If I try to write the same code in JSP as a JAVA class, keeping StreamGobler class same, the programme executes successfully.
    Please help me find solution to this at the earliest. Thanks in advance,
    Prachi

    Thanks,
    I got it working by making the constructor Public.
    -Prachi

  • Executing one system command from one java class. ERROR. Please help me

    Hello i am trying to add users into one linux machine using one jaav program but when i execute the java class the system doesn't show me any error and dont make anything.
    The linux command, in the main of the class, is correct; from thelinux shell it runs well, but from the java class it doesn't run.
    Can you help me please?
    thanks
    import java.io.*;
    public class ejecutaUsuario {
    /** Creates a new instance of ejecutaUsuario */
    public ejecutaUsuario(String cmdline) {
    try {
    String line;
    Process p = Runtime.getRuntime().exec(cmdline);
    BufferedReader input =
    new BufferedReader
    (new InputStreamReader(p.getInputStream()));
    while ((line = input.readLine()) != null) {
    System.out.println(line);
    input.close();
    catch (Exception err) {
    err.printStackTrace();
    System.out.println(err);
    public static void main(String argv[]) {
    String passwd="hola";
    String usuarioInterno="xxxxxx";
    new ejecutaUsuario("/bin/sh useradd -p `openssl passwd -1 -salt 12345678 " + passwd + "` -d /home/" + usuarioInterno + " -m -s /bin/bash " + usuarioInterno);

    Try gettting the error input stream as well (getErrorStream()). Maybe you are getting output there.
    You might want to try just executing the 'useradd' part, getting the output stream of that process, and then put the parameters of useradd into the outputstream.
    Later
    Cardwell

  • Execute Java class on startup of OC4J

    So this might not even be possible in OC4J. But is there any way I can specify a Default Run Target for an OC4J container on an application server, similar to how you can specify a Default Run Target on JDeveloper. I want to execute a java class every time the OC4J server starts up.
    But here's the basic issue:
    1) I have a multi-threaded application that runs on an Oracle 10gR2 application server (in OC4J).
    2) The program has an automated portion of it that runs in its own thread in the background - right now I manually launch this thread with a request to a servlet
    3) When OC4J restarts (say for the monthly server reboot, etc) is there any way I can have OC4J launch that thread for me
    Basically its encapsulated in a runner.class's main() which does all work of setting up the application. This way we don't have to manually do it. I've tried modifying the command line arguments in the IAS Console so that it does something like:
    $ORACLEHOME/jdk/bin/java -classpath $ORACLE_HOME/j2ee/MyApp1/applications/MyApp1/webapp1/WEB-INF/classes:$ORACLE_HOME/jlib/MyStandard.jar -Djava.security.policy=/a0111/oracle/oraBI1/j2ee/MyApp1/config/java2.policy -Djava.awt.headless=true MyApp1.runner
    However that leads me down class path hell of having to declare every class used by the OC4J container.
    Thanks for all the help.

    You can use a LifeCycle listener, which can be loaded using the configuration file. I forget the exact XML element, but it's available in virtually every level of the configuration.
    However with a stub for native code the usual trick is to load the library in a static initializer, which will cause it to be loaded the first time the class is actively used. That's less hastle.

  • Output from java class and display

    I have a big output from a java class after executing a java class... where can store that huge output before I <cflocation to the same page? I need to display the output to the user on the relocated page...Any help appreciated...

    cfsavecontent to a session variable.

  • Invoking Java classes from Forms

    We are running an AIX Forms server, and we would like to be able to execute a java class with two command-line parameters (ex. "java myClass.class param1 param2"). Is the "java" run-time executable available on AIX? I'm assuming it would be part of the JRE installed with Oracle 8.1.6, but where might I find it, and can it be called with the HOST() command?
    Thanks,
    Jonathan

    I think if you have forms server installed you will have a java runtime there on the disk somewhere.
    Regarding activating the java check out the "java importer" tool that comes with patch 4 of developer 6i.
    null

  • Drop all java classes

    Hi there folks,
    I'm facing a rather nasty problem: I have deployed a number of
    java classes to the database via loadjava while the rest of the
    team were still developing away.
    To delete classes via dropjava you need the file they were
    loaded from (e.g. a .jar file). Now the .jar files have changed
    during the development and using dropjava with them will leave
    some files in the database.
    Is there a way to get rid of all classes in one scheme without
    the source files?
    TIA,
    Joerg

    list all your java classes by cursor
    select object_name from all_objects where owner='SHEMA' and
    object_type='JAVA CLASS'
    and for all object_name execute
    drop java class "object_name"

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Java class integration with Oracle Identity Manager 9.1.0.2

    Hello Friends,
    I have a java class that is responsible for sending notifications, my question is how do the relationship of this class with the Oracle Identity Manager 9.1.0.2 so you can take the class and notify users when an application is approved or rejected.
    Any recommendation for this process.
    Thanks for the support
    Edited by: JLK on Jun 12, 2012 5:20 PM

    Hi
    Java class integration with OIM happen through concept of adapters. You can go through OIM documentation of how to create adapters.
    In your case you should create a process task adapetrs adn attach it on the Approved response code in your approval process.
    Desingn Console --> Process management --> Process definition --> <Apprlication Process Ex: AD User>.
    Alternatively you can also send notification using OIM OOTB email templates.
    Regards
    user12841694

  • I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Is Apple aware of this problem? No longer supported?

    My web page uses a Java Applet to allow my visitors to replay chess games; the Chess Viewer Deluxe applet was written by Nikolai Pilafov some time ago and has been working properly for some time (until recently). I don't monitor this part of my site regularly so I am not sure when it began to fail. On his web site [http://chesstuff.blogspot.com/2008/11/chess-viewer-deluxe.html] he has a link to check LiveConnect object functionality (which fails for OBJECT tags). His recommendation is to "seek platform specific support which might be available from the JRE developers for your platform".
    I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Until I checked the LiveConnect object functionality, I was unable to identify the source of the console error messages. This does seem to be the smoking gun.
    Is Apple aware of this problem? Are these classes no longer supported? Has anyone else had this problem? You can attempt to recreate the problem locally by going to my web page: http://donsmallidge.com/DonSmallidgeChess.html
    Thanks in advance for any help you can provide!
    Abbreviated Java Console output:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    load: class ZeroApplet.class not found.
    java.lang.ClassNotFoundException: ZeroApplet.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)
    load: class JavaToJS.class not found.
    java.lang.ClassNotFoundException: JavaToJS.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)

    I just went up to check the LiveConnect object functionality page AND IT WORKED THIS TIME! I must confess, this is very mysterious. I will do some more checking and reply here if I can determine why it is working now (and more importantly, why it didn't work before).

  • How to execute the ldapsearch command by java class in linux os?

    hi,all
    I want to query the users by ldapsearch command. I call the command in my java class. In windows, It work well. But in linux , there haven't any result. My test program is following:
    ===============
    import java.util.*;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.LineNumberReader;
    public class test{
    public static Vector queryAllUser(){
    try{
    Vector v=new Vector();
    String cmdquery="ldapsearch -h localhost -b\"dc=metasphere,dc=com\" \"uid=*\" uid ";
    //String cmdquery="ls -la";
    Process process=Runtime.getRuntime().exec(cmdquery);
    System.out.println("cmdquery:"+cmdquery);
    InputStreamReader ir=new InputStreamReader(process.getInputStream());
    LineNumberReader input = new LineNumberReader (ir);
    System.out.println("input="+input);
    String line;
    while ((line = input.readLine ()) != null){
    System.out.println("Line:"+line);
    if(line.startsWith("uid")){
    String temp=line.substring(line.indexOf(":")+1,line.length());
    v.add(temp);
    return v;
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("runtime error:"+e.getMessage());
    return null;
    public static void main(String argv[]){
    Vector v=queryAllUser();
    for(int i=0;i<v.size();i++){
    System.out.println((String)v.get(i));
    ================
    In fact, when I execute the command: ldapsearch -h localhost -b"dc=metasphere,dc=com" "uid=*" uid
    in linux prompt, the screen show the results:
    version: 1
    dn: uid=toppymgt,dc=metasphere,dc=com
    uid: toppymgt
    dn: uid=qutao,dc=metasphere,dc=com
    uid: qutao
    dn: uid=zz,dc=metasphere,dc=com
    uid: zz
    dn: uid=z,dc=metasphere,dc=com
    uid: z
    dn: uid=admin,dc=metasphere,dc=com
    uid: admin
    dn: uid=alan,dc=metasphere,dc=com
    uid: alan
    dn: uid=misssixty,dc=metasphere,dc=com
    uid: misssixty
    dn: uid=channelv,dc=metasphere,dc=com
    uid: channelv
    What's reason? Please help me. Thx.

    If there have a bugs in Linux OS. Please help me!

  • Displaying the output from a java class executed from W/I another class

    I have compiled a java class, but I have run into a problem executing the class. I have read the posts and still have not solved the solution. I have tried to get the output of the Process by using "proc.getOutputStream().toString()", however it displays it in binary (ex. java.io.BufferOutputStream@48eb2067). If anyone can provide any assistance I would greatly appreciate it. Or if you could tell me if I'm on the right track or not. Thanks ALL. Here is a code segment:
    int truncStart = s.indexOf(".java");
                   s = s.substring(0,truncStart);
                   String[] command2 = {"java","c:/"+s};
                   try
                   //JOptionPane.showMessageDialog(null,"Exec. File "+s, "Exec. File : ",JOptionPane.ERROR_MESSAGE);
                   proc = Runtime.getRuntime().exec(command2);
                   JOptionPane.showMessageDialog(null,"Output: "+proc.getOutputStream().toString(),"Output"
    ,JOptionPane.ERROR_MESSAGE);
                   }

    You have to read the stream, like:
    InputStream stream = proc.getOutputStream();
    // now use methods on stream, such as read() to read the characters/lines - or wrap it in another line-friendly stream - see the java.io.* classes - keep reading until you get an end-of-stream indicator, depending on the API you end up using.

Maybe you are looking for