Synchronization of native functions

can i declare a native function in my class with synchronization keyword e.g.
synchronized public native short fnMyFunc();
although the compiler doesnot throw any error, is this function actually synchronized at runtime?
please help

can i declare a native function in my class with
synchronization keyword e.g.
synchronized public native short fnMyFunc();
although the compiler doesnot throw any error, is this
function actually synchronized at runtime?
Yes. Synchronization happens before the actual call so java has no problem doing that in JNI.
Keep in mind however that you can still produce a deadlock in C++ if you call the wrong thing (just as you could in java.)

Similar Messages

  • Can i pass an int * to a native function?

    From Java, can I pass an int pointer to the JNI?
    I want the native function to assign data to an int in the Java program.
    Many thanks!

    838478 wrote:
    Many thanks to both of you for your helpful responses. I pitched my original question somewhat disingenuously in order to be precise. My actual development issue is broader:
    I have C++ API that passes many data types by reference (as pointers or references) in order to modify the passed values. If I were to wrap this API to call it from from Java it sounds as though passing each parameter as an object (e.g. Integer for int would be the cleanest way to go. Does this sound correct?
    One enigma: I have to call a native function with a char * argument that returns with that char * pointing to a buffer of binary data. How should I pass back that binary buffer to Java? As a String? Your problem is not specific enough.
    1. You want to create data, regardless of the type, on the native heap and pass it through java to another native method. Solution: Use a long. You have a pointer to the data (again the type does NOT matter), you cast it to a long, you return that from your first method, pass it into the second, and there you cast the long back to the pointer. The pointer can point to anything you like including complex data types.
    2. You want to create data, of some complex structure, on the native heap and then access that data in java. Then you MUST map it to java types, every piece of data, of every type, specific to the type. So a native int maps to a java int (if the sizes match), a char* maps to a String, etc. You MUST create in some fashion every java data item that you need. There are NO shortcuts.

  • Exit handling in native function by JNI

    Hi everyone,
    We are developing a Java application using native function calls through JNI in Linux.
    The application starts and calls a native function and the native function attach a signal
    handler and an exit handler. In addition, in the native function, we fork another process
    and in the forked process, we calls a several java-side methods. It works in normal cases.
    However, when System.exit() is called in the java-side methods invoked by a native function,
    the application is stopped. Thus we add shutdown hook (Runtime.getRuntime().addShutdownHook())
    to treat this case. The shutdown hook just calls a native method, and the native method
    just calls exit(). We expect the calling exit() in the native method invoked in shutdown hook for JVM
    invokes our exit handler which is attached in advance. It looks working well.
    But, sometimes we find several garbage(?) jvm processes (we can see the process named as "java"
    in using Linux command "ps"). The parent process of these processes is init process (pid = 1).
    With the pid of these processes, we suspect the processes are created when we fork another process
    in native function invoked through JNI. However it is not happened every times in our application.
    Why the garbage java processes remain? Is there any problem in the calling exit() in the native
    method invoked during JVM Shutdown process?
    I hope any answers for this problem.
    Thanks in advance,
    Seung-Uk Oh

    Thus we add shutdown hook
    (Runtime.getRuntime().addShutdownHook())
    to treat this case. The shutdown hook just calls a
    native method, and the native method
    just calls exit(). We expect the calling exit() in the
    native method invoked in shutdown hook for JVM
    invokes our exit handler which is attached in advance.
    It looks working well.I wouldn't think that was a good idea.
    You are terminating the JVMs normal exit process. Why don't you just register the exit processes in your own stack and call them with the native method?

  • How to handle errno in native function?

    How to get the correct errno in a native function? I'm using Unix message queues in my native methods and I always get the errno = 0 (it should be ENOMSG = 35) returned when the desired message is not yet available (calling msgrcv with IPC_NOWAIT set). This program is running on IBM AIX 4.3. Please help...

    I cached and printed the errno in my C native function
    and it was 0?Well there are several possibilities.
    One it is zero. Which means that there is mis-match on your part as to why it should have a different value. If you print the value out in your C code right after you get it and it is zero then this is definitely the problem. The most likely reason is because the data that you pass is not what you think it is.
    Or you are not returning the cached value to java but rather something else. If you print the value out in your C code just after you get it, and it has the correct value then this is your problem. The mostly likely reason for this is that you are actually using two different variables (but you think it is one variable.) One possible reason for this is different way "static" is handled in C and C++. But there could be others.

  • Exception thrown in native function.

    Hello,
    I've encountered a bizarre, yet repetitive problem with
    Dreamweaver 8. Whenever I close out of any file (.htm, .cfm, .dwt
    for example) that contains any JavaScript I get the following error
    and then DW crashes:
    While executing DWMenu_File_Close command in menus.xml, the
    following JavaScript error(s) occurred:
    Exception thrown in native function.
    I've been working with Dreamweaver for a few years, gone to
    MAX, my partner is a certified professional, and a user group
    manager. I can't fix this problem. It's got to be related to my
    system, as she has no problems whatsoever. I've been through the
    newsgroups, the technotes, developer center, and a reloaded my
    system (XP Pro) a few times.
    Thanks - David

    You can try this simple fix -
    Quit DW.
    Find this file -
    C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    (these folders are normally hidden - you may have to use
    Explorer > Tools >
    Folder Options to unhide them)
    and delete it.
    Restart DW. Works better?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "lotuseducation" <[email protected]> wrote
    in message
    news:e3a6up$ckl$[email protected]..
    > hi
    >
    > i am facing a strange error in my DW 8,
    > the error message is :
    >
    > while executing onLoad, the following Javascript
    error(s) occurred:
    > at line 36 of file "E:\Program
    files\Macromedia\Dreamweaver
    > 8\Configuration\Commands\_afterSave.htm":
    > Exception thrown in native function.
    >
    > what to do now? any idea
    >
    > i did not find any solution in google search for this
    >
    > thanks in advance
    > ashok sharma
    >

  • Call native function fflush & strprn from java

    Hi,
    I need to call a native function fflush and stdprn from java for printing a file.
    How can i call this function?
    Can any one help me with sample code.
    Thanks,
    rpalanivelu

    Thanks your reply,
    Actually my problem is need to take printout using dot matrix printer(text printer) with different font size.
    So, i am using native method which is available in c.
    in c program i am using fflush,stdprn and fprintf.
    Here i've attached my sample program also.
    #include <jni.h>
    #include "NativePrint.h"
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #define MAXLINE_LEN 100
    JNIEXPORT jint JNICALL
    Java_NativePrint_dotMatrixPrint(JNIEnv* env, jobject obj )
    FILE *fp;
    char filename[20];
    char line[100]; /* A line read from the file */
    int lineNumber = 0;
    /* Print control codes */
    char boldOn = 14;
    char boldOff = 20;
    char contentlenOn = 15;
    char contentlenOff = 18;
    printf("Printing from C3");
    strcpy( filename , "sayHello.c" );
    /* Open the file in read mode */
    fp = fopen( filename , "r" );
    /* Error in opening file, then exit */
    if ( fp == NULL )
    printf( "\nERROR: %s cannot be opened\n" , filename );
    exit( 1 );
    while ( fgets( line , 100 , fp ) != NULL )
    lineNumber++; /* Line we are about to process next */
    printf("%s",line);
    /* If this is the first line */
    if ( lineNumber == 1 )
    /* then print it in bold */
    //fprintf( stdprn , "%c" , boldOn );
    fprintf( stdprn , "%c" , contentlenOn );
    fprintf( stdprn , line );
    fprintf( stdprn , "%c" , contentlenOff);
    //fprintf( stdprn , "%c" , boldOff );
    else
    /* else print it in normal mode */
    fprintf( stdprn , line );
    fflush(stdprn);
    return 0;

  • How to compile and creat JAR with native function

    Hi there,
    I wrote some native function for J2ME. But it seems like using J2ME wireless Toolkits, we can not compile native function. Is it right?
    Is anyone knowing how to compile and make JAR with J2MEWTK or command line?
    Thanks,
    Merry Christmas!!

    [zack327],
    JNI like or native interfaces APIs is not supported in the CLDC/MID Profile 1.0 specification. If you have J2ME code that includes JNI code, the J2MEWTK tool will not compile successfully for you.
    To package the compiled code to a MIDlet suite .jar file, use the 'Package' command in the J2MEWTK toolkit. It is found on the top menu bar 'Project' option as item on the dropdown list.
    To package the MIDlets into a MIDlet suite .jar file from the command line, you can execute the usual jar file command:
    jar cf MyMIDletSuite.jar Midlet.class
    You will also need to create a MIDlet .jad Application Descriptor file as well.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Problem calling native functions

    Ok, I generate a dll with some native functions, but when I want to use one of the native functions I get the error:
    java.lang.UnsatisfiedLinkError: pruebas.TestClass.myFunction(II)I
    where pruebas.TestClass is the class that class the native function myFunction(int, int)...
    I get the same error when I do not load the dll, can somebody help me solve this error
    thanks a lot
    God bless you
    --Chema                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hmm, never done this on windows so I can't be too sure. You can try setting java.library.path and see if it helps.
    http://www.inonit.com/cygwin/jni/helloWorld/load.html
    (the command wopuld be java -Djava.library.path=YOURPATH yourapplication)

  • Calling native functions from java w/out DLL

    If I invoke a JVM inside my c++ app and try to start up a class that calls a native function, do I still need a DLL for that? Or will it look to my header file and then look to my implementation somewhere in a c++ class?
    For example:
    WinMain() - Invokes JVM and loads "HelloWorld" java class, then calls its 'main' method.
    HelloWorld.java - 'main' method calls "displayHello();" a native function.
    HelloWorld.h - defines displayHello native interface
    So it looks simply to the cpp implementation of the interface...I tried executing this but it isnt working...is it even possible?

    OK, I attempted what you posted by writing the following code... please look at because I get a 'main' not found error. I am trying to execute this from a win32 app...
    Callbacks.java:
    class Callbacks {
      private native void nativeMethod(int depth);
      private void callback(int depth) {
        if (depth < 5) {
          System.out.println("In Java, depth = " + depth + ", about to enter C");
          nativeMethod(depth + 1);
          System.out.println("In Java, depth = " + depth + ", back from C");
        } else
          System.out.println("In Java, depth = " + depth + ", limit exceeded");
      public static void main(String args[]) {
        Callbacks c = new Callbacks();
        c.nativeMethod(0);
    }InvokeJVM.cpp:
    #include "InvokeJVM.h"
    //Log any windows errors
    void InvokeJVM::LogWin32Error(const char * pTitle){
         PCHAR pBuffer;   
         LONG  lError = GetLastError ( );
         FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
              NULL,                   
              lError,                   
              MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),                   
              (char *)&pBuffer,                   
              0,                   
              NULL );
         //LogError ("Win32 error: %s %s\n",pBuffer,pTitle);
         LocalFree ( pBuffer );
    //Get a string returned from the windows registry
    bool InvokeJVM::GetStringFromRegistry(HKEY key, const char *name, unsigned char *buf, int bufsize){
         DWORD type, size;
         if (RegQueryValueEx(key, name, 0, &type, 0, &size) == 0 && type == REG_SZ && (size < (unsigned int)bufsize)){
              if (RegQueryValueEx(key, name, 0, 0, buf, &size) == 0){
                   return true;
         return false;
    //Get the path to the runtime environment
    bool InvokeJVM::GetPublicJREHome(char *buf, int bufsize){
         HKEY key, subkey;   
         char version[MAX_PATH];  
         /* Find the current version of the JRE */
         if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, JRE_KEY,0,KEY_READ,&key)!=0){
              //LogError("Error opening registry key '" JRE_KEY "'\n");          
              return false;   
         if(!GetStringFromRegistry(key,"CurrentVersion",(unsigned char *)version, sizeof(version))){
              //LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\CurrentVersion\n");          
              RegCloseKey(key);          
              return false;   
         if(strcmp(version, DOTRELEASE)!= 0){
              //LogError("Registry key '" JRE_KEY "\\CurrentVersion'\nhas value '%s', but '" DOTRELEASE "' is required.\n", version);
              RegCloseKey(key);          
              return false;   
         /* Find directory where the current version is installed. */   
         if(RegOpenKeyEx(key,version,0,KEY_READ, &subkey)!= 0){
              //LogError("Error opening registry key '"JRE_KEY "\\%s'\n", version);          
              RegCloseKey(key);          
              return false;   
         if(!GetStringFromRegistry(subkey, "JavaHome", (unsigned char *)buf, bufsize)){
              //LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\%s\\JavaHome\n", version);          
              RegCloseKey(key);          
              RegCloseKey(subkey);          
              return false;   
         RegCloseKey(key);   
         RegCloseKey(subkey);   
         return true;
    //Native interface call to printf
    jint JNICALL _vfprintf_(FILE *fp, const char *format, va_list args){
         //LogError(format,args);     
         return 0;
    //Native interface call if the VM exited
    void JNICALL _exit_(jint code){     
         //LogError("VM exited");     
         exit(code);
    //Native interface call if the VM aborted
    void JNICALL _abort_(void){
         //LogError("VM aborted");     
         abort();
    //Load the Java Virtual Machine
    void InvokeJVM::LoadJVM(char* dir){
         HINSTANCE handle;     
         JavaVMOption options[5];     
         char JREHome[MAX_PATH];     
         char JVMPath[MAX_PATH];                                             
         char classpathOption[MAX_PATH];     
         char librarypathOption[MAX_PATH];
         if(!GetPublicJREHome(JREHome, MAX_PATH)){          
              //LogError("Could not locate JRE");          
              abort();     
         strcpy(JVMPath,JREHome);     
         strcat(JVMPath,"\\jre\\bin\\client\\jvm.dll");
         if ((handle=LoadLibrary(JVMPath))==0) {          
              //LogError("Error loading: %s", JVMPath);          
              abort();   
         CreateJavaVM_t pfnCreateJavaVM=(CreateJavaVM_t)GetProcAddress(handle,"JNI_CreateJavaVM");
         if (pfnCreateJavaVM==0){          
              //LogError("Error: can't find JNI interfaces in: %s",JVMPath);          
              abort();     
         strcpy(classpathOption,"-Djava.class.path=");
         strcat(classpathOption,dir);     
         strcat(classpathOption,";");     
         strcat(classpathOption,JREHome);     
         strcat(classpathOption,"\\lib");     
         strcat(classpathOption,";");
         strcat(classpathOption,JREHome);     
         strcat(classpathOption,"\\lib\\comm.jar");     
         strcpy(librarypathOption,"-Djava.library.path=");     
         strcat(librarypathOption,JREHome);     
         strcat(librarypathOption,"\\lib");
         OutputDebugString("classpath option=");     
         OutputDebugString(classpathOption);     
         OutputDebugString("\n");     
         OutputDebugString("librarypath option=");     
         OutputDebugString(librarypathOption);     
         OutputDebugString("\n");
         options[0].optionString=classpathOption;
         options[1].optionString=librarypathOption;          
         options[2].optionString="vfprintf";     
         options[2].extraInfo=_vfprintf_;     
         options[3].optionString="exit";     
         options[3].extraInfo=_exit_;     
         options[4].optionString="abort";     
         options[4].extraInfo=_abort_;
         vmArgs.version = JNI_VERSION_1_2;
         vmArgs.nOptions = 5;   
         vmArgs.options  = options;  
         vmArgs.ignoreUnrecognized = false;
         if(pfnCreateJavaVM(&jvm,(void**)&env, &vmArgs) != 0){
              //LogError("Could not create VM");
              abort();     
    }Winmain.cpp:
    #define WIN32_MEAN_AND_LEAN
    #define WIN32_EXTRA_LEAN
    #include <windows.h>
    #include "oglwindow.h"          // the OpenGL window class
    #include "vector.h"
    #include "engine.h"               // the engine's main class
    #include "BrimstoneEngine.h"
    #include "InvokeJVM.h"
    JNIEXPORT void JNICALL Java_HelloWorld_displayHelloWorld(JNIEnv *, jobject){
        MessageBox(NULL, "Hello From Java!", "Error", MB_OK);
        return;
    JNIEXPORT void JNICALL Java_Callbacks_nativeMethod(JNIEnv *env, jobject obj, jint depth){
      jclass cls = env->GetObjectClass(obj);
      jmethodID mid = env->GetMethodID(cls, "callback", "(I)V");
      if (mid == 0) {
        return;
      printf("In C, depth = %d, about to enter Java\n", depth);
      env->CallVoidMethod(obj, mid, depth);
      printf("In C, depth = %d, back from Java\n", depth);
    JNINativeMethod methods[] = {"nativeMethod","()V", Java_Callbacks_nativeMethod};
    WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, int nCmdShow){
         InvokeJVM javaVirtualMachine;
         int loopRet;
         javaVirtualMachine.running = false;
         CoInitialize(NULL);
         if (!COGLWindow::RegisterWindow(hInst)){
              MessageBox(NULL, "Failed to register window class", "Error", MB_OK);
              return -1;
         BrimstoneEngine *engine = NULL;
         try{
              char path[MAX_PATH];  
              char drive[MAX_PATH];   
              char file[MAX_PATH];   
              char dir[MAX_PATH];   
              char ext[MAX_PATH];
              jclass  cls, cls1;     
              jmethodID mid;     
              jobjectArray args;
              jint err;
              _splitpath(path,drive,dir,file,ext);          
              javaVirtualMachine.LoadJVM(dir);     
              if(javaVirtualMachine.env == NULL){               
                   MessageBox(NULL, "Could not load VM", "Error", MB_OK);
                   abort();          
              if(GetModuleFileName(NULL, path, MAX_PATH) == 0){               
                   javaVirtualMachine.LogWin32Error("Getting module filename");          
                   abort();          
              cls = javaVirtualMachine.env->FindClass("Callbacks");
              if(cls == NULL){               
                   MessageBox(NULL, "Could not find class %s (or its superclass)", "Error", MB_OK);
                   exit(-1);          
              err = javaVirtualMachine.env->RegisterNatives(cls, methods, 1 );
              mid = javaVirtualMachine.env->GetMethodID(cls, "main", "([Ljava/lang/String;)V");
              if(mid == NULL){
                   MessageBox(NULL, "Could not find method 'main'", "Error", MB_OK);
                   exit(-1);          
              args = javaVirtualMachine.env->NewObjectArray(2-2, javaVirtualMachine.env->FindClass("java/lang/String"), NULL);          
              if(args==NULL){               
                   MessageBox(NULL, "Could not create args array", "Error", MB_OK);
              for(int arg=0; arg < 2;arg++)     {               
                   javaVirtualMachine.env->SetObjectArrayElement(args, arg, javaVirtualMachine.env->NewStringUTF(argv[arg+2]));      
              javaVirtualMachine.env->CallStaticVoidMethod(cls,mid,args);     
              javaVirtualMachine.jvm->DestroyJavaVM();
              engine = new BrimstoneEngine("OpenGL Game", FALSE, 800, 600, 16);
              loopRet = engine->EnterMessageLoop();
              delete engine;
              return loopRet;
         catch(char *sz)
              MessageBox(NULL, sz, 0, 0);
              delete engine;
         CoUninitialize();
         return -1;
    }any help is always appreciated

  • Native function call

    I created a native c class which is called in a java code. when i try to execute the program , there is "java.lang.UnsatisfiedLinkError". I tried to place the dll file created in the appropriate directory, but still i get the same error.
    My java class( which tries to access the c class) is in a package which is inside another directory, will this create any problem?
    kindly help me with ur suggestions. thank you

    I am attaching the code fragments below:
    package JavaFem;
         public class FESAMDSolver extends FESolver {
         public native void cAMDorder(int neq, int[]ap, int[]ai, int[]pv);
              static {
              //System.loadLibrary("testamd");
              System.load("Z:/testamd.dll");
              public void solve() {
         cAMDorder(num_eqns, Ap, Ai, pVector); // calling the native C method
    My native function code :
    #include <jni.h>
    #include "JavaFem_0005cFESAMDSolver.h"
    #include "amd.h"
    JNIEXPORT void JNICALL Java_JavaFem_0005cFESAMDSolver_cAMDorder
    (JNIEnv *env, jobject obj, jint n, jintArray ApArray , jintArray AiArray, jintArray PArray)
              jintArray Ap = (*env)->GetIntArrayElements(env, ApArray, 0);
              jintArray Ai = (*env)->GetIntArrayElements(env, AiArray, 0);
              jintArray P = (*env)->GetIntArrayElements(env, PArray, 0);
              (void) amd_order (n, Ap, Ai, P, (double *) NULL, (double *) NULL) ;
    Directory structure
    JavaFemViewer\JavaFem
         JavaFem is a package inside the JavaFemViewer folder.
    My testamd.dll file and all C file objs are located inside the JavaFem directory. When i created a dll file, there was no header file generated along with it.
    The error i get is displayed below:
    java.lang.UnsatisfiedLinkError: cAMDorder
    at JavaFem.FESAMDSolver.cAMDorder(Native Method)

  • Crash in call to Native function

    I am trying to use the JNIEXPORT from my Java Applet. At the point of call to the JNIEXPORT function my applet terminates without any error / crash dialog.
    I am not sure what is happening with it. Please guide.

    You're trying to invoke native code in an applet? That's not legal unless the applet is signed, and you have configured the SecurityManager, and the user grants the applet permission to run.
    Right?

  • Native function in iOS to save a pdf and access a pdf off the network?

    Hi,
    My camera didn't ship with a manual inside. I'd like to be able to download the pdf version of the manual from the camera website and save it to my iOS for future reference when i am possibly off wireless network. Any ideas how I can do that without downloading an app? Does the Apple iOS have any built-in functionality to accomplish this?  I have heard the Andriod OS has a built-in PDF viewer.
    Thanks for your help community!

    You can save the file in iBooks. This keeps it on the phone and you can view it in iBooks. That is a native iOS app.

  • Native function call halting my program execution...

    Well, I successfully got a an audio DLL made with JNI/SDL. This little program basically just runs until it finishes a song, then terminates.
    Problem is that the program waits for it to finish.
    I tried this:
    class MusicThread extends Thread{
         public native boolean startMusic();
         public native void    endMusic();
         public MusicThread(pumpkin owner){
              super(owner);
         public void start(){
              startMusic();
    }Hoping it would cause Java to run the thread seperatly, but that doesn't work. The only thing I can think of is having the DLL itself open the new thread, but I would like to explorer java options first.
    Is there some way I can get it to not wait until my DLL function stops running to continue?
    Does it have to be done on the C++ side?

    Alright, everything up and working.
    I can't believe how helpful this board is. Thanks to you guys I have an increasingly impressive looking game that will soon have an entire SDL sound library!
    Thanks a ton!

  • How to call C functions from native functions?

    Hi, I want to call a C function from a JNICALL?
    i wrote somthin like this:
    #include "ParamInput1.h"
    #include <jni.h>
    #include <stdio.h>
    #include "testPhase1.h"
    JNIEXPORT void JNICALL
    Java_ParamInput1_phase1(JNIEnv *env,
                   jobject obj,
                   jdouble tSim,
                   jdouble tSup,
                   jdouble iSim)
    double threshSim = tSim;
    double threshSup = tSup;
    double itemSim = iSim;
    /* call test Phase1 to execute the function*/
    testPhase1(threshSim, threshSup, itemSim);
    return;
    And I always get "undefined symbol: testPhase1__Fddd" error!
    what is the problem here? thanks alot!
    Jim

    Basically - you are already are compiling a c file. Replace that c file with all the c files.
    Specifically it depends on the OS, compiler and how you are compiling
    For windows add it the project or compile each file and then add the object fill to the link line.
    For unix add the other c files in to the compile line the same place you have the current C file.

  • Synchronize built-in - Functionality

    Hi All,
    I have following code written in one of the forms. These forms have been written long time ago and now we have converted the Forms from 6i to 10g so dealing with some of the lost network issue. I just need to know what this Synchronize built does in the following code. Thanks.
    Form Level - Key-Next-Item Trigger.
    next_item;
    synchronize;
    SHOW_PAGE2;
    Form Level - When-New-item-instance Trigger
    synchronize;
    SHOW_PAGE2;

    What Andreas said(and the online help):
    >
    Synchronizes the display's screen with the internal state of the form. That is, SYNCHRONIZE updates the screen display to reflect the information that Oracle Forms has in its internal representation of the screen.
    >
    When code(with navigation like next_record or so) is executed in forms, the position of the cursor will not be shown until the end of the code.
    Example where I used synchronize:
    A loop over all records in a block, for every record there was some procedure executed. This procedure could show a message. Without using the synchronize built-in the cursor was still on the first record of the block(where the cursor was when the loop started). With the synchronize built-in the cursor was on the record that showed the message.
    I hope this helps...
    Edited by: poelger on Feb 24, 2009 4:45 PM

Maybe you are looking for

  • XML Data Source Import on Start

    I have a "time sheet" form that I've created in Livecycle Designer. It's going to interface with software that holds a database in MySQL. My understanding was that LCD doesn't play well, if at all, with MySQL. I wrote a PHP script that converts the e

  • IPad air screen

    Just got my iPad air. Nice and so much lighter than iPad 3. but, the screen does not seem as nice. Specifically, scrolling shows ghosting.  With white text on dark background, when I scroll, the text turns GREEN. is any one else seeing this?

  • HT1386 My iPhone still stuck on Syncing and Backing up

    I have iphone 4S and have aproblem, that my phone stuck on syncing and backing up I unistall iTune twice and downloaded it again, restart the PC several times, i did as many wrote but NON of them helped My iPhone still stuck on Syncing and Backing up

  • Having trouble with You Tube app (unknown error )

    After I tap the video to begin playback a little message comes up saying "unknown error " And all the iOS devises at our house does the same!!!! Does anybody have solution for this ???

  • Backup Assistant won't let me restore MMS to my new replacement phone....why?

    My original Curve's cursor button suddenly stopped working.  So I couldn't use it to check email, SMS or MMS messages.  While waiting on my replacement Curve to arrive I received 4 new text messages, at least two of them were MMS (I could tell by the