Problem calling a Java Method from C++

hi everyone,
i'm using JNI and i'm trying to call a Java method from C++, this is the code:
SocketC.java
public class SocketC
private native void conectaServidor();
private void recibeBuffer()
System.out.println("HELLO!!!");
public static void main(String args[])
SocketC SC = new SocketC();
SC.conectaServidor();
static {
System.loadLibrary("Server_TCP");
Server_TCP.cpp
char* recibirSock()
     int _flag = 1;
     while(_flag != 0)
          memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
          recv(sock,buffer,sizeof(buffer),0);
          printf(" Mensaje del cliente: %s\n",buffer);
          _flag = strcmp(buffer,"salir");
     }//fin while
     return buffer;
void enviarSock()
     int _flag = 1;
     getchar();
     while(_flag != 0)
          memset(buffer,0,sizeof(buffer));//procedimiento para enviar
          printf("\n Escriba: ");
          gets(buffer);
     //     err=scanf("%s",buffer);
          send(sock,buffer,sizeof(buffer),0);
          _flag = strcmp(buffer,"salir");
     }//fin while
}//fin enviarSock
DWORD servicio(LPVOID lpvoid)//
     char *buf;
     printf("\n Cliente aceptado!!!!!\n");
     buf=recibirSock();
     return 0;
JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)
//void main()
/*this is the problem i'm calling the method recibeBuffer*/
     jclass cls = env->GetObjectClass(obj);
     jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "(V)V");
     if (mmid == 0)
          return;
     env->CallVoidMethod(obj, mmid); //llama a Java
     WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock
     printf("TCP conexion Sockets\n\n");
     //estimez vous heureux que je foute pas de copyright ;)
     system("TITLE TCP Conexion Sockets (Version server)");
     //fo avouer que c'est plus joli
     int port;
     printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
     scanf("%i",&port);
     sinserv.sin_family=AF_INET;     //Je ne connais pas d'autres familles
     sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
     sinserv.sin_port=htons(port);
     server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
     //SOCK_STREAM pour le TCP
     bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
     //On lie les parametres du socket avec le socket lui meme
     listen(server,SOMAXCONN);//On se met � �couter avec server, 0 pour n'accepter qu'une seule connection
     printf(" Servidor conectado.");
     while(1)
          sinsize=sizeof(sin);
          if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
          {//accept : acepta cualquier conexion
               if (hReadThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
               servicio, 0, 0, &dwThreadID))
                    printf("\nHOLA!");
                    GetExitCodeThread(hReadThread,&dwExitCode);
                    CloseHandle (hReadThread);
               else
                    // Could not create the read thread.
                    printf("No se pudo crear");
                    exit(0);
when i'm running the proyect i get this error:
C:\POT Files\UCAB\tesis\esmart\french>java SocketC
Exception in thread "main" java.lang.NoSuchMethodError: recibeBuffer
at SocketC.conectaServidor(Native Method)
at SocketC.main(SocketC.java:16)
i don't know why this is happening i got declare the method recibeBuffer in my SocketC.java class, but doesn;t work can anyone help me?
PD: sorry for my bad english i'm from Venezuela

Next time please paste your code between [code] tags with the code button just above the edit message area.
To answer your question, you wrote the wrong method signature. It should be:jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "()V");Regards

Similar Messages

  • How to call a C function calling a Java Method from another C function ?

    Hi everyone,
    I'm just starting to learn JNI and my problem is that I don't know if it is possible to call a C function calling a Java Method (or doing anything else with JNI) from another C function.
    In fact, after receiving datas in a socket made by a C function, I would like to create a class instance (and I don't know how to do it too ; ) ) and init this instance with the strings I received in the socket.
    Is all that possible ?
    Thank you very much for your help !

    Hard to understand the question, but by most interpretations the answer is going to be yes.
    You do of course understand that JNI is the "API" that sits between Java and C and that every call between the two must go through that. You can't call it directly.

  • Order of arguments while calling a Java method from C

    Hi
    are there any rules to order the transferred arguments ?
    I wanted to transfer a native window event from C to Java and if the called
    java method is declared like this: (int, long, int) (IJI)V
    public static void nativeMouseButtonDownCallback(int wParam, long lParam, int which)
    the value of 'which' is not correct (always the same independent from what I set it to in the C function)
    If I declare the java method like this: (int, int, long) (IIJ)V
    public static void nativeMouseButtonDownCallback(int which, int wParam, long lParam)
    everything is fine.
    Any information appreciated !
    Bye Mark

    Thanks for your reply !
    Initially I also thought that the set of the value could be wrong and so
    I used a printf statement in C to monitor the transferred value.
    And still: the value I put in was different from what I got in java.
    After this I put in simple numbers like 1,2,3 and in java I still got
    the same wrong value.(guess max signed int 21474836..)
    I really replaced the dll and class files and restarted the IDE.
    The problem got solved by changing the order of the long an int.
    Bye Mark

  • Problem Calling a Java class from PLSQL function

    We are calling a Java class through oracle function as
    FUNCTION CalculateAMW (contributorid IN Number,
    fromdate IN Date,OHorAnncoverage in Number,
    OHAnncoverage in Number,
    AppStatus in Number,
    Status in Number)
    RETURN Number
    AS LANGUAGE JAVA
    NAME 'AMWCalculations.calculateAMW
    (long,java.sql.Timestamp,long,long,long,long) return double';
    on execution of this function the sql prompt for the 1st time it is giving the output
    but
    if reexecute it is throwing and error ORA - 932 : Inconsistent
    datatypes.
    Recompiling the java class then it works for the 1st time and the next
    time
    we execute it throws error as explained above.
    What could be the problem.
    Thanks
    Nanda Kishore

    any idea???Yes, you are in the wrong forum, this is a Java forum, you have an ASP question, so i suggest you visit an ASP forum/site

  • Can we call a java method from python

    Hi, Can we invoke a java application from python. If yes, can any of you post a sample python script. Also please specify any links if you find useful for this. I do not want to use either Jython or any others for this. I would like to do it particularly from Python.
    Thanks.

    For Perl there was a module that allows to access java classes there might be a one for python too do a goole search

  • Is it possible to call a java method from servlet

    Hi All,
    I am trying to import a java class to my servlet and call a method of that class, is this possible. I am getting an error while importing the class.
    I am using tomcat, have put my class files in th path
    \WEB-INF\classes\com\kiran
    My java goes like this
    package com.kiran;
    import java.sql.*;
    import javax.sql.*;
    public class DbCon
    { Connection con=null;
    public Connection getCon()
    -----return con;
    catch(Exception e){ return con; }
    and my aim is to call getCon() from my servlet. which is as follows
    package com.kiran;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.kiran.DbCon;
    public class check extends HttpServlet
    DbCon db;
    i am not able to compile my servlet, err is --> cannot find symbol DbCon..
    How can i import the class, do i require any entries in web.xml ?
    expecting your advice..
    Thanks in advance
    Best Regards,
    Kiran

    Ok, first off, if you are testing in tomcat (and as you said you are placing the class files in the path), you already compiled this classes, right? Otherwise I don't see how you placed your classes in /WEB-INF/classes/. Note that you will need two class files (based on your code. If not, then I'm missing part of the question. Typically, your IDE will help you with this problem a lot. The only thing that seems confusing is the catch (Exception e) statement which needs to be as part of a method (I assume this is a typo on your part).
    If your problem is at runtime, don't forget to configure your web.xml to see your servlet.

  • Permission problem calling a java object from a store procedure

    When I run my store procedure
    CREATE OR REPLACE PACKAGE BODY confirms_write_to_file
    AS
    FUNCTION translate(in_en_var in VARCHAR2)
    RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'translate.translatePath(java.lang.String) return java.lang.String';
    PROCEDURE write_to_file(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
    IS
    file_handle               UTL_FILE.FILE_TYPE;
    file_location VARCHAR2(50);
    BEGIN
    file_location := translate(in_en_var);
    dbms_output.put_line ('opened file location' ||file_location);
    END write_to_file;
    END confirms_write_to_file;
    I get the following error:
    exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
    SQL> exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
    Exception java.security.AccessControlException: the Permission
    (java.io.FilePermission <<ALL FILES>> execute) has not been granted by
    dbms_java.grant_permission to
    SchemaProtectionDomain(RIMS|PolicyTableProxy(RIMS))
    opened file locationProcess problem
    PL/SQL procedure successfully completed.
    When I try to to grant myself the permissions
    begin
    dbms_java.grant_permission('rims','java.io.FilePermission','*','execute');
    dbms_java.grant_permission('rims', 'java.lang.RuntimePermission', '*','writeFileDescriptor' );
    end;
    I get the following Error:
    oracle.aurora.vm.IdNotFoundException: rims is not a user or role
    at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
    at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
    at
    oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java)
    at oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java)
    at
    oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
    at
    oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java)
    begin
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.aurora.vm.IdNotFoundException: rims is not a user or role
    ORA-06512: at "SYS.DBMS_JAVA", line 0
    ORA-06512: at line 2
    My java code is as follows
    import java.io.*;
    import java.util.*;
    class translate
         public static String translatePath(String envar)
              Runtime rt = Runtime.getRuntime();
              int bufSize = 4096;
              byte buffer[] = new byte[bufSize];
              String path = null;
              Process p = null;
              int len = 0;
              try
                   p = rt.exec("echo "+envar);
                   BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
                   while ((len = bis.read(buffer, 0, bufSize)) != -1)
                        System.out.write(buffer, 0, len);
                   path = new String(buffer);
                   p.waitFor();
              catch(Exception e)
                   System.out.println("Exception "+e);
                   return "Process problem ";
              return path;

    Tony,
    I answered this very same question that you posted at the JavaRanch forum.
    Good Luck,
    Avi.

  • Problem calling java method from c

    Hi ,
    I'm trying to call a java method from a C program. it gives no error during compilation as well as building the application. but when i tried to create the JVM by running my application it pops up the message "The application failed to start because jvm.dll was not found. Re-installing the application may fix the problem." I tried out setting all the environment variables to include the jvm.dll(PATH set to c:\j2sdk1.4.2_05\bin;c:\j2sdk1.4.2_05\jre\bin). Still got the same message. Then i re-installed java platform once more. Even now i get the same error. I have more than one jvm.dll at locations jre\bin\client and server, oracle has some jvm.dll . Will that be a problem? if so can i remove those? which of them should be removed and how?
    The code i'm using is
    #include <stdio.h>
    #include <jni.h>
    #include <windows.h>
    //#pragma comment (lib,"C:\\j2sdk1.4.2_05\\lib\\jvm.lib")
    JavaVM jvm; / Pointer to a Java VM */
    JNIEnv env; / Pointer to native method interface */
    JDK1_1InitArgs vm_args; /* JDK 1.1 VM initialization requirements */
    int verbose = 1; /* Debugging flag */
    FARPROC JNU_FindCreateJavaVM(char *vmlibpath)
    HINSTANCE hVM = LoadLibrary("jre\\bin\\server\\jvm.dll");
    if (hVM == NULL)
    return NULL;
    return GetProcAddress(hVM, "JNI_CreateJavaVM");
    void main(int argc, char **argv )
    JavaVM jvm = (JavaVM )0;
    JNIEnv env = (JNIEnv )0;
    JavaVMInitArgs vm_args;
    jclass cls;
    jmethodID mid;
    jint res;
    FARPROC pfnCreateVM;
    JavaVMOption options[4];
    // jint (__stdcall pfnCreateVM)(JavaVM *pvm, void **penv, void *args) = NULL;
    options[0].optionString = "-Djava.compiler=NONE"; /* disable JIT */
    options[1].optionString = "-Djava.class.path=c:/j2sdk1.4.2_05/jre/lib/rt.jar"; /* user classes */
    options[2].optionString = "-Djava.library.path=lib"; /* set native library path */
    options[3].optionString = "-verbose:jni"; /* print JNI-related messages */
    /* Setup the environment */
    vm_args.version = JNI_VERSION_1_4;
    vm_args.options = options;
    vm_args.nOptions = 4;
    vm_args.ignoreUnrecognized = 1;
    JNI_GetDefaultJavaVMInitArgs ( &vm_args );
    pfnCreateVM = JNU_FindCreateJavaVM("jre\\bin\\server\\jvm.dll");
    res = (*pfnCreateVM)(&jvm,(void **) &env, &vm_args );
    // res = JNI_CreateJavaVM(&jvm,(void **) &env, &vm_args );
    /* Find the class we want to load */
    cls = (*env)->FindClass( env, "InstantiatedFromC" );
    if ( verbose )
    printf ( "Class: %x" , cls );
    /*jvm->DestroyJavaVM( );*/
    Could anyone help me solve this problem as early as possible, bcoz i'm in an urge to complete the project.
    Thanks in advance.
    Usha.

    You either have to add to the system path of where is your jvm.dll is located or explicitly link to jvm.dll call GetProcAddress to obtain the address of an exported function in the DLL.

  • Call Java Method from Callback function

    I am writing a JNI wrapper in c++ for a particular event driven DLL. The DLL makes a network connection to another device and then calls a callback function when events are raised on the device. The DLL has 3 basic functions: connect, disconnect, and registerEventListener. RegisterEventListener takes a function pointer which is called each time an event is raised on the device.
    My wrapper DLL exposes connect and disconnect functions via JNI. I can call these functions just fine from my Java code. Now the question... How do I call a Java method from my c++ callback function? I can call a Java method using env->CallXXXMethod(...) from within a function that is accessible to Java but I don't have access to the JNI parameters in my Callback function.
    So how do I call a Java method from a callback function? If this cannot be done then what is the "right way" to handle native event notification with JNI?

    jschell wrote:
    JNI parameters? Meaning what exactly?
    General outline of a callback
    1. Entry
    2. Get the VM, env - there are methods for this
    3. Attach the thread
    4. Get a java object - how depends on what you are doing, but create it or a static reference.
    5. Get the java method
    6. Call the java method.That is exactly correct. The callback function is called from a separate thread so using a cached pointer to JNIEnv, obtained from the original native method, crashes the JVM. The jmethodID and jclass objects (which are needed to call the static Java method) can be cached without problem. The following is the code I used to attach the current thread and call my static method.
    void MyClass::onEvent(int system_id, char* data)
         //get a pointer to the Java Environment
         JNIEnv *env;
         jvm->AttachCurrentThread((void **)&env, NULL);
         //Call the Java method with the newly aquired data
         jstring js = env->NewStringUTF(data);
         env->CallStaticVoidMethod(cls, mid, system_id, js);
    }My last question is about cleanup in this function. When I use NewStringUTF to "convert" my char* to jstring do I need to do anything special to clean up or will the Java garbage collector take care of it since the jstring is being passed to a Java method?
    Thanks for you help

  • How to call java method from actionscript

    I've just now started working on Flex. May be its basic question but I’m not aware of it – how can I call a java method from actionscript. I want to call some java method on double click of a event. Can you please let me know how to proceed on this?

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to call java method from xsl

    hi friends,
    How to call a java method from xsl, i have a xsl file which will call the java method and retrieve the value and display it to the user. but its work well when i set xalan.jar and xerces.jar and the java class files in my classpath and run as
    java org.apache.xalan.xslt.Process -in navigate.xml -xsl nav-exst.xsl -HTML -out navoutpage.html[b]
    in the command prompt but when i deploy it as web application it gives error as
    [b]Namespace 'MyPack' does not contain any functions[b]

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • Call Java method from JavaScript

    Hi,
    I have a Java class called abc.java and in that I have a method called assignValue(String value).
    I need to call this method, assignValue() , from JavaScript.
    Is there a way to call a Java method from JavaScript.
    Any help is greatly appreciated.
    Thanks.

    Yes I did, and I still don't get it, I have created a JSF web application, not an applet, as I posted earlier my code to executes sit's in a class file, not an applet file.
    My Page1.class file is as follows
    * Page1.java
    package a1;
    import ....
    public class Page1 extends AbstractPageBean {
        public void valset(int val) {
    }my jsp file "Page1.jsp" is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <ui:page binding="#{Page1.page1}" id="page1">
                <ui:html binding="#{Page1.html1}" id="html1">
                    <ui:head binding="#{Page1.head1}" id="head1">
                        <ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </ui:head>
                    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
                        <ui:form binding="#{Page1.form1}" id="form1">
    <applet code="Page1.class" name="Page1" width="1100" height="600">
                    </applet>
                            <ui:button action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" onMouseOver="form1.Page1.valset(1);"
                                style="left: 239px; top: 192px; position: absolute" text="Button"/>
    </ui:form>
                    </ui:body>
                </ui:html>
            </ui:page>
        </f:view>
    </jsp:root>All I get is a grey box the size of the applet window. Could you please let me know what I'm doing wrong?

  • Call java method from button in UIX page

    Greetings,
    I want to call a java method from a button on a uix page.
    Does it have to be a submit button or it maybe a simple button.
    If it was from a JSP page, it would be a much more different process ?
    This method should delete a row from another view (View2).
    delete from tableB ta where ta.field1 = &1
    My question is how do I build the method to delete a row and how do I invoke the method using the button ?
    Thanks

    This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ?
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

Maybe you are looking for

  • Capacity Requirement in each capacity category

    Hi experts, I have some queries about capacity category in project as follow scenario: 1. I have a work center NLE0001 including 2 capacity category that are PERSON and MACHINE. 2. Then I assign this work center to a internal activity in PS. In detai

  • Error when trying first test "midp HelloMidp"

    Hello, I'm a newbie with j2me I have a small problem to create my first application. I'm tried an example I read in a book. Here is the code of my class: import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class HelloMidp ex

  • Moving several events into a new calendar...

    I am consolidating several different databases and now have too many overlapping calendars in iCal. I'd like to be able to select a dozen or more events in one calendar and move then into another calendar, so I don't need to go into each event indivi

  • I can not purchase gems in clash of clans . They tend to ask me to refer to iTunes support . Please help

    I am not able to purchase any in app purchases . Both clash of clans and Paz 2 . They always ask me to contact support in iTunes . But I always get no answer . Btw I am using iPad mini Help !!!

  • MM Doc no. and corresponding OD no. vice varsa

    Dear experts, Please help. i need to know OD - Outbound Delivery No. and related MM doc number ( movement type 601) from the table. What is the table name .. is there any std. T-code for that? Kindly help. Thank you. Best regards, Zusen