ADF mobile: access app preferences from java

Hi,
Jdev 11.1.2.3.0 + mobile extension.
Where I can find example code or documentation to access preferences (configured in adfmf-application.xml) from java code?
regards
Peter

Thanks!
It's following part of the document:
"At the Java layer, an EL value expression is resolved using the following
approach:
String val =
AdfmfJavaUtilities.evaluateELExpression("#{preferenceScope.feature.f0.vendor}")
regards
Peter

Similar Messages

  • ADF mobile Client App: Issue about using db sequence for populating row_id

    Hi,
    I'm working on an ADF mobile client app POC project. In the mobile app, new record can be created, the column type for row_id is VARCHAR2(15), I used the db sequence created in MC db, converted the seq number to a string, then set row_id via initDefaults method.
    The new records are created and row_ids are set with the proper sequence numbers when first time launching the client app in blackberry simulator. But if I exit the app and re-launch the app again, I got net.rim.device.api.database.DataTypeExpection when trying to create a new record.
    Could anyone please help me and let me know what could cause this issue? What should be the proper way to populate the row_id? Appreciate your response in advance!
    Jdev/ADFMobile extension version:
    11.1.1.4.0 build 5860
    mobile server version:
    10.3.0.3
    blackberry version:
    BlackBerry JDE 5.0.0
    BlackBerry Smartphone Simulators 6.0.0.141 (9800)
    Code:
    public class SOrgExtEOImpl extends EntityImpl {
    protected void initDefaults() {
    super.initDefaults();
    SequenceImpl seq = new SequenceImpl("S_SIEBELMOBILE_S_ORG_EXT", getDBTransaction());
    populateAttributeAsChanged(ROWID1, seq.getSequenceNumber().toString());
    Log:
    First time launching the MC app:
    [FINE - adfnmc.bindings - BC4JIteratorBinding - createRow]
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 0 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 1 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 2 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 3 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 4 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 5 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 6 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 7 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 8 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 9 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 10 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 11 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 12 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 1 to 2010-12-20 14:58:13.0
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 3 to 2010-12-20 14:58:13.0
    [FINE - adfnmc.model - SequenceImpl - create] Database SQLite doesn't support sequences natively; creating TableSequenceImpl for
    S_SIEBELMOBILE_S_ORG_EXT
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 0 to 73501
    [FINE - adfnmc.model - EntityImpl - getAttribute] Retrieved from siebel.mobile.SOrgExtEO.CreatedBy at index 2
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 2 to 1-11ZQ
    [FINE - adfnmc.model - EntityImpl - getAttribute] Retrieved from siebel.mobile.SOrgExtEO.LastUpdBy at index 4
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 4 to 1-53Y
    [FINE - adfnmc.model - EntityImpl - getAttribute] Retrieved from siebel.mobile.SOrgExtEO.BuId at index 5
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 5 to 1-1DG
    [INFO - adfnmc.model - MetaObjectManager - findOrLoadMetaObject] MetaObject siebel.mobile.AccountAddressFKAssoc not found in cache, so
    loading it from XML
    [INFO - adfnmc.model - MetaObjectManager - findOrLoadMetaObject] MetaObject siebel.mobile.ActivityAccountFKAssoc not found in cache, so
    loading it from XML
    [FINE - adfnmc.bindings - BC4JIteratorBinding - notifyRowInserted]
    [FINE - adfnmc.bindings - IteratorExecutableBindingImpl - rowInserted] IterBinding - AccountPageDef:AccountAddressView1Iterator
    [FINE - adfnmc.bindings - IteratorExecutableBindingImpl - notifyRowInserted] IterBinding - AccountPageDef:AccountAddressView1Iterator
    [FINE - adfnmc.bindings - RangeBindingImpl - rowInserted] AccountAddressView1
    [FINE - adfnmc.bindings - RangeBindingImpl - notifyNewElement] AccountAddressView1, index:0
    [FINE - adfnmc.ui - BBTable - newElement] relativeIndex = 0
    [FINE - adfnmc.bindings - RangeBindingImpl - setVariableIndex] Begin, AccountAddressView1, listener: oracle.adfnmc.component.ui.BBTable$1
    [FINE - adfnmc.bindings - SimpleContext$Variables - setVariable] Setting variable "row" to expression #
    {AccountPageDef_AccountAddressView1_rowAlias}
    [FINE - adfnmc.ui - BBOutputText - endInit]
    Re-launching the MC app:
    INFO - adfnmc.bindings - BC4JOperationBinding - execute] Preparing to execute OperationBinding id:'CreateInsert'
    [FINE - adfnmc.bindings - BC4JIteratorBinding - createRow]
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 0 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 1 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 2 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 3 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 4 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 5 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 6 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 7 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 8 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 9 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 10 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 11 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 12 to
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 1 to 2010-12-20 15:08:35.0
    [FINEST - adfnmc.model - EntityImpl - populateAttribute] Setting value at index 3 to 2010-12-20 15:08:35.0
    [FINE - adfnmc.model - SequenceImpl - create] Database SQLite doesn't support sequences natively; creating TableSequenceImpl for
    S_SIEBELMOBILE_S_ORG_EXT
    [INFO - adfnmc.ui - ErrorHandlerImpl - reportException] BindingContainer: AccountPageDef, exception: oracle.adfnmc.AMCJboException
    [WARNING - adfnmc.ui - ErrorHandlerImpl - reportException] [oracle.jbo.server.SequenceImpl$TableSequenceImpl.retrieveSequenceParamsFromDB]
    oracle.adfnmc.AMCJboException: ADF-MNC-60109: Error retrieving sequence parameters for sequence S_SIEBELMOBILE_S_ORG_EXT
    [WARNING - adfnmc.ui - ErrorHandlerImpl - reportException] oracle.adfnmc.java.sql.SQLException:
    net.rim.device.api.database.DataTypeException:Datatype mismatch
    [WARNING - adfnmc.ui - ErrorHandlerImpl - reportException] Unable to retrieve String at index 2
    [WARNING - adfnmc.ui - ErrorHandlerImpl - reportException]
    [FINE - adfnmc.ui - MessageBox - show] message=oracle.adfnmc.AMCJboException: ADF-MNC-60109: Error retrieving sequence parameters for
    sequence S_SIEBELMOBILE_S_ORG_EXT
    [FINE - adfnmc.ui - MessageBox - show] oracle.adfnmc.java.sql.SQLException: net.rim.device.api.database.DataTypeException:Datatype mismatch
    [FINE - adfnmc.ui - MessageBox - show] Unable to retrieve String at index 2

    >
    >
    using 10gR2 on Sun-Solaris. Getting consistently "db file parallel read" over 35 ms as an average wait for the past few months. No performance issues as such.
    Using RAID 1+0. DB Size is 2 TB. Transactions are OLTP/Batch
    Is this metric high or normal. How to justify that..
    Looking at your results it's not really possible to say.
    db file parallel read is a request for a number of randomly distirbuted blocks, and the time for a read is the time for the last block of the set to be returned.
    Without knowing how many blocks are being requested at a time you can't really determine what constitutes a reasonable time. Given that you say OLTP + Batch, and have a large volume of scattered reads, it's quite possible that you have some queries on the Batch side doing very large index range scans - which would allow for some very large db file parallel reads.
    I take it from the use of statspack that you're not licensed for the diagnostic and performance packs; it would be easy to query v$active_session_history to get some idea of the number of blocks per request as this is given by the P2 parameter. As it is. you may be able to get a rough idea by messing about with the various "physical read" numbers in the Instance Activity section of statspack.
    Regards
    Jonathan Lewis

  • Is ADF mobile will shared preference (like in Android API) ?

    Hi,
    Is ADF mobile will shared preference (like in Android API) ?
    I appreciate your help
    Thanks
    Jay

    Here's the documentation:
    Enabling User Preferences - 11g Release 2 (11.1.2.4.0)
    Frank

  • "access denied" error from Java Web Start

    I can successfully download the jar file, but always have error message "access denied" when the java application tries to open a local file in C:\temp\poc1.xml.
    I can successfully execute the java application from DOS,but failed when using Java Web Start. The error message is as follows:
    Java Web Start Console, started Wed Nov 28 16:30:31 PST 2001Java 2 Runtime Environment: Version
    1.3.1 by Sun Microsystems Inc.java.security.AccessControlException: access denied
    (java.io.FilePermission C:\temp\poc1.xml read)     at
    org.apache.xerces.framework.XMLParser.parse(Unknown Source)     at
    org.apache.xerces.framework.XMLParser.parse(Unknown Source)     at
    com.hotlocker.client.HLSessionParser.parse(Unknown Source)     at
    com.hotlocker.client.UploadDownloadClient.uploadFiles(Unknown Source)     at
    com.hotlocker.client.UploadDownload.main(Unknown Source)     at
    java.lang.reflect.Method.invoke(Native Method)     at
    com.sun.javaws.Launcher.executeApplication(Unknown Source)     at
    com.sun.javaws.Launcher.executeMainClass(Unknown Source)     at
    com.sun.javaws.Launcher.continueLaunch(Unknown Source)     at
    com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)     at
    com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)     at
    com.sun.javaws.Launcher.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)

    Hi,
    you can't get a file like in a "normal" app
    because a JWS-app runs in the restricted
    sandbox environment by default.
    So you either sign your app with a digital certificate
    or you use a special FileOpenService (JNLP-API).
    You could also put the file into the app-jar and
    load it by a classloader.
    Regards,
    Mathias

  • ADF Mobile: Apple App Store: Encryption Registration Number for Sqlite

    When submitting apps to Apple App Store, you have to declare whether or not your app uses encryption. This is for export compliance reasons. If you answer Yes, you need to provide an Encryption Registration Number (ERN). I assume that since the Sqlite DB in ADF Mobile is encrypted, I need to answer Yes. I've gotten a lot of differing opinions on this, but I'm looking for a definitive answer from either Apple or Oracle. Has anyone been through this already?
    Thanks

    Hi, Mike, here is our response on this question. First thank you for your inquiry around Apple AppStore’s Encryption Export question. The exact question from Apple’s iTunesConnect portal is “Have you added or made changes to encryption features since you last uploaded a binary for this product?”. While we will do our best to suggest an answer based on our understanding of the situation, ultimately any answer that relates to an Apple process or website needs to come from Apple.
    Our understanding of the question is that it pertains to the functionality or features of the application you developed using Oracle ADF Mobile and Apple iOS SDK, not to the capabilities of the development tools nor the framework. Furthermore, the question focus on changes between previous (there may be none) and current version of the application. Therefore, for the following scenarios:
    •     V1– no encrypted database nor secured SSL communication to the backend services.
    o     Based on our understanding of the question, the answer would be “No” as you have not added any encryption feature.
    •     V2 – adds encrypted local database and/or secured SSL communication to backend service
    o     Based on our understanding, the answer would be “Yes” as there are changes in the encryption features
    •     V3 – same database encryption and SSL communication as v2.
    o     Based on our understanding, the answer would be “No” as there is no change in the encryption features between v2 and v3.
    Hope this helps, and please let me know if you have any questions.
    Thanks,
    Joe Huang

  • XMLAnalysis Error while trying to execute a MDX query on MS SSAS - Accessing the cube from Java through Olap4j driver

     Am trying to access MS SSAS data cube from Java through olap4j driver(through msmdpump.dll). I am able to connect , but when I try to execute a query, i am getting the below error: Please help
    me out . (I tested the http://XXXX/OLAP/msmdpump.dll in MS Excel , and it is working fine)
    org.olap4j.OlapException: XMLA provider gave exception: <soap:Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>
    XMLAnalysisError.0xc10a0004
    </faultcode>
    <faultstring>
    The CRASHDWHSRG cube either does not exist or has not been processed.
    </faultstring>
    <detail>
    <Error Description="The CRASHDWHSRG cube either does not exist or has not been processed." ErrorCode="3238658052" HelpFile="" Source="Microsoft SQL Server 2012 Analysis Services">
    </Error>
    </detail>
    </soap:Fault>

    See my other answer where you asked this same question on another thread
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/22dfc400-668d-4bd4-b76d-7c6b9ddda47a/msmdpumpdll-not-getting-registered?forum=sqlanalysisservices
    http://darren.gosbell.com - please mark correct answers

  • Access SAP Tables from Java Program

    Hi All,
    We have a requirement to integrate attendance portal(which is done in java) with SAP.
    Our problem is how to access SAP tables from a Java program?
    Database is Sybase.
    Please suggest us a good solution.
    Thanks in advance...

    Did you go through Sap Help?
    Calling BAPIs from Java - BAPI User Guide CA-BFA) - SAP Library
    Regards,
    Philip.

  • Access SAP BW from Java

    Hello,
    I need to build a Java web application that can collect and display data from various SAP BWs.
    Write operations are not required. What is the easiest way to do that?
    I found that SAP Open Hub Service lets you extract the data to a CSV file or a relational table.
    Assuming I go the way of creating a relational table, the following questions arise:
    - Where are those tables stored? Still within SAP BW or in an external relational DBMS (e.g. an Oracle database)?
    - How can I access those tables from within my Java code (just through a standard JDBC driver)?
    - Who initiates the population of those tables?
    - Can I trigger the extraction at a given time from within my java code?
    - If so, can I hand in filter critera, so that the table is populated only with data that matches my filter, or do I need to extract all data to the relational table and then filter at the next step?
    - Can I have a timer in the SAP BW that creates the table on a certain schedule (e.g. once per day)?
    What other (easier) options are there to achieve this task?
    Thanks,
    MARK
    Edited by: M. Arnold on Aug 17, 2010 9:50 AM

    Mark,
    What you can look at are :
    1. Use a JDBC connector to connect to the database directly - this has some obvious disadvantages because the data would have to be linked with the SID tables , text tables and Dimension tables for cubes which makes the process extremely cumbersome
    2. Use Openhub to extract to a relational table and access the same - possible , but you have two steps in between - openhub to update table and then access the table while maintaining data consistency - this might become a maintenance nightmare once you heavily use this concept
    3. Use web services - there are standard web services like query_view_data and rfc_read_tale which you can use - these web services are SOAP based and you should be able to use the same in your JAVA application
    4. Use the BI JAVA SDK to connect to the backend through an API supported by SAP - this would be easy to use - the SDk should be available on SCN or on the support marketplace and you shoiuld be able to use the same quite easily
    5. Use JCO and build the application using NWDS where you have native connectivity to SAP BW using JCO
    6. Use Web Dynpro JAVA to develop your application where you should be able to access the necessary APIs wherever required.
    Edited by: Arun Varadarajan on Aug 17, 2010 8:15 PM

  • UnsatisfiedLinkError - Trying to access a DLL from Java

    I am trying to use the Java Native Interface (JNI) to run some C++ code from Java. I tried a simple test program to teach myself that, and it worked perfectly. However, now that I'm tackling a bigger project (A data acquisition program), I get an UnsatisfiedLinkError in the line that calls the function from the DLL.
    Here is the stacktrace: Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.Invoca
    tionTargetException
            at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAc
    tion.java:859)
            at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(App
    licationAction.java:665)
            at org.jdesktop.application.ApplicationAction.actionPerformed(Applicatio
    nAction.java:698)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
    95)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(App
    licationAction.java:662)
            ... 26 more
    Caused by: java.lang.UnsatisfiedLinkError: fileiotest.dllinterface.startget()V
            at fileiotest.dllinterface.startget(Native Method)
            at fileiotest.dllinterface.start_daq(dllinterface.java:26)
            at fileiotest.FileIOTestView.startrun(FileIOTestView.java:680)
            ... 31 moreI have made sure that the DLL is in the classpath, using both the -classpath tag and by setting the PATH variable. Is something wrong with my DLL itself, perhaps?

    Yes, I have.
    I didn't include the code yet because I thought if someone had similar trouble, there might be something obvious I am overlooking and they wouldn't even need to see the code. I can provide it, however.
    This is the C++ DLL
    // consoledaq.cpp : Defines the entry point for the console application.
    #include <windows.h>                    /* Compiler's include files's */
    #include <string.h>                  
    #include <stdio.h>
    #include "cbw.h"
    #include "stdafx.h"
    #include "dllinterface.h"
    #include "jni.h" //can copy or give full path
    #include <math.h>
    BOOL APIENTRY DllMain( HANDLE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
        return TRUE;
    #define BOARD_NUM      0                /* Number of A/D board as defined with InstaCal */
    #define BUF_SIZE       10048            /* Size of buffer */
    #define NUM_SECS       10                /* Number of secs to collect data */
    #define ADRANGE        BIP5VOLTS        /* A/D voltage range */
    #define TIMER_NUM      1                /* Windows timer used by this program */
    static HGLOBAL  MemHandle32;       
    /* Variables for AinScan */
    static unsigned short *ADValues;    /* Win32 pointer to A/D buffer */
    static HGLOBAL   ADMemHandle;
    static short     ADCurStatus;       /* Current status for D/A scan */
    static long      ADCurCount;        /* Current count for A/D scan  */
    static long      ADCurIndex;        /* Current index for A/D scan  */
    int              ADOptions;
    long       Count, Rate;
    float      Voltage, Voltage2;
    unsigned short CurValue, CurValue2;
    JNIEXPORT void JNICALL
    Java_daq_startget(JNIEnv *env, jobject obj)
         cbErrHandling (PRINTALL, STOPALL);  /* Set library's error handling */
         ADCurStatus = RUNNING;
         ADCurIndex = 0l;
         ADCurCount = 0l;
         /* Allocate A/D Windows buffer */
         ADMemHandle = cbWinBufAlloc ((long)BUF_SIZE);
         /* Allocate a local WIN32 buffer to hold A/D Data */
         MemHandle32 = GlobalAlloc(GMEM_FIXED | GMEM_DDESHARE, BUF_SIZE *sizeof(short));
         /* Get a 32-bit pointer to the A/D WIN32 buffer */
         ADValues = (unsigned short *)GlobalLock(MemHandle32);
         /* Start up background A/D scan */
         Count = BUF_SIZE;
         Rate = BUF_SIZE / (NUM_SECS * 2);
         ADOptions = BACKGROUND | CONTINUOUS;
         cbAInScan (BOARD_NUM, 0, 1, Count, &Rate, ADRANGE, ADMemHandle, ADOptions);
    JNIEXPORT void JNICALL
    Java_daq_stopget(JNIEnv *env, jobject obj)
         cbStopBackground(BOARD_NUM, AIFUNCTION);  /* Stop A/D subsystem background scan */
         if (ADMemHandle)                 
              cbWinBufFree (ADMemHandle);   /* Free allocated memory */
         if (MemHandle32)
              GlobalFree (MemHandle32);
    JNIEXPORT jfloatArray JNICALL
    Java_daq_getpoint(JNIEnv *env, jobject obj)
         jfloatArray theArray;
         if (ADCurIndex >= 0)
              /* Copy Data from memory to 32 bit memory buffer */
              cbWinBufToArray(ADMemHandle, &ADValues[ADCurIndex], ADCurIndex ,2);
              CurValue = ADValues[ADCurIndex];
              CurValue2 = ADValues[(ADCurIndex + 1)];
         else
              CurValue = 0;
              CurValue2 = 0;
         jfloat tmp[2];
         theArray =  env->NewFloatArray(2);
         cbToEngUnits(BOARD_NUM,ADRANGE,CurValue,&Voltage);                      
         cbToEngUnits(BOARD_NUM,ADRANGE,CurValue2,&Voltage2);
         tmp[0] = Voltage;
         tmp[1] = Voltage2;
         env->SetFloatArrayRegion(theArray, 0, 2, tmp);
         return theArray;
    }And this is the Java class:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package fileiotest;
    * @author Owner
    public class dllinterface {
        public native void startget();
        public native float[] getpoint();
        public native void stopget();
        static {
         System.loadLibrary("daqdll");//This is firstJNI.DLL
         /*if generated by borland
         System.loadLibrary("firstjni");//This is firstjni.dll
        public static void start_daq()
            dllinterface DI=new dllinterface();
            DI.startget();
        public static void stop_daq()
            dllinterface DI=new dllinterface();
            DI.stopget();
        public static float[] get_data_point()
          dllinterface DI=new dllinterface();
          float newtempfloat[];
          newtempfloat = DI.getpoint();
          return newtempfloat;
    }

  • Accessing  table type from JAVA

    Hi Experts,
    We are making a custom copy of the std FM COM_BPUS_ORG_CONTPERS_REGISTER .
    It is observed that Tables are obsolete and we should not use them in custom function modules.
    I can pass a table type in import parameter and export parameter.
    Can we access a table type from java layer.
    Also, note that this STANDARD function module has parameter IT_BUSINESSPARTNERROLE_ORG which has table type BU_ROLE_T.
    Is it possible to access this?
    Note:- This Function module is not getting called in standard web shops.
    Please let me now how i can access this table type for hava while calling FM so as to input or retrieve valus from it.
    Regards
    Antony

    The issue with you is more than accessing a table type.
    You said:
    This Function module is not getting called in standard web shops.
    For function modules that are not called as a part of the standard flow, you have to develop your own simple BOM, BO, BEI, BE classes and methods to call the custom RFC - the whole nine yards. See the extension guide and see the Extension Demos 2 and 3 for reference.
    See the sample JCO calls from Java to understand how to access the table types.

  • How to access physical files from java platform

    Hello All,
    We have one JDE Word Writer program, which export the order master data in the DB2/400 Physical files.
    We want to access this data from our java program (reside on windows platform). I am wondering how we can do that. I got one hint that can be accessed by ODBC connection. But I am unable to get the correct ODBC driver. I am looking for correct driver to access the data.
    If some one has done this already, please help me. Or suggest me any alternate way.
    Dinesh

    Can use File class to write code to examine and manipulate file.
    Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/file.html

  • Discovering someone has accessed app store from my computer..?

    Hi,
    I just went on to the apple store to update some programs. When I clicked update, the window asking for my app store password popped up. Usually my email address is already filled in. Only this time there was some one elses email address there. You'll say it's not a problem, all i need to do is replace it. But how come someone else has connected to the app store from my macbook. No one has had access to my macbook, it's password protected. In addition the email address is (...)@mail.ru which is a russian website, everyone I know has nothing to do with Russia and can't speak russian.
    Could someone have pirated my computer? What is going on?
    Thanks,
    Pete

    https://discussions.apple.com/docs/DOC-5261

  • How to access system calls from java program?

    i am having a doubt regarding accessing system calls from a Java program like accessing unix system calls from a c program.

    Runtime.getRuntime().exec("line command here");
    example:
    Runtime.getRuntime().exec("ls -la");

  • Accessing DLL files from Java

    I have a problem with Java, and the problem is that I'm trying to call a DLL file declared by C++ only but without a support for Java programs, is what I'm aiming for going to be available by using the rundll32.exe file.
    Note: I'm trying to use the (skydll.dll) file for controling skystar2 DVB card.
    Message was edited by:
    JZoro

    You cannot directly call a DLL from Java unless the DLL exposes entry points that are compatible with the JNI calling conventions.
    For example a Java class calling a native function like below:
    class Arguments
       private native void setArgs (String[] javaArgs);
       public static void main (String args[])
          Arguments A = new Arguments();
          newArgs[] = A.setArgs(args);
       static
          System.loadLibrary("MyArgs");
    }Needs a DLL entry point with the following signature:
    JNIEXPORT void JNICALL
    Java_Arguments_setArgs (JNIEnv *jenv, jobject job, jobjectArray oarr) {Notice that the first parameter of the method is of type JNIEnv and the second can be either a reference to a class or Java object instance.
    Jacques Gonzalez
    J4SOFT

  • What path to use to access network files from Java app running on Mac

    I have a Java app running on a Mac with OS X that I'm using to check for files that exists on Windows servers within our network.
    Using a path like /Volumes/<Share>/ works because I've already connected to the drive using Finder. If I try to use a fully qualify the path with "smb://<Server>/<Share>" then my app doesn't see anything. Is there any way that I can get Java to connect to a directory without first having mapped or made the connection via some external tool like Finder?
    Here's the code I'm testing with:
    package FileImports;
    import java.io.File;
    import java.util.Arrays;
    public class Dir {
    static int indentLevel = -1;
    static void listPath(File path) {
    File files[];
    indentLevel++;
    files = path.listFiles();
    if (!(files == null)){
    Arrays.sort(files);
    for (int i = 0, n = files.length; i < n; i++) {
    for (int indent = 0; indent < indentLevel; indent++) {
    System.out.print(" ");
    System.out.println(files.toString());
    if (files[i].isDirectory()) {
    listPath(files[i]);
    indentLevel--;
    } else System.out.println("Directory not accessible!");
    public static void main(String args[]) {
    // this path works where <share> = the directory where my files exist.
    listPath(new File("/Volumes/<share>"));
    // this path returns a null result in files
    // listPath(new File("smb://<Server>/<Share>/"));
    Thanks,
    Alex
    Edited by: agates on Sep 25, 2008 11:14 AM

    agates wrote:
    Thanks for the response. I'll have to dig a little deeper into JCIFS. It looks like it would work great windows to windows. I haven't been able to find in the documentation where it would work on OS X without having to mount the targeted file system first. Has anyone had success creating a connection to a windows file system from OS X with JCIFS?Since jCIFS is written in pure Java and implements the entire SMB/CIFS protocoll on it's own it doesn't require any support from the OS (apart from a normal JVM runnig). Thus it should work exactly the same in OS X and Windows (and Linux and Solaris and ...).

Maybe you are looking for