How to use the TCP/IP in Java?Thanks!

How to use the TCP/IP in Java?Thanks!

Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
Abraham

Similar Messages

  • How to use the random generator in java

    hey peeps, this is the class in which i am trying to implement the random generator in;
    public class Matchlist
        private studentdetails sd = new studentdetails();
        /** matchList StringBuilder stores the match list in progress */
        private StringBuilder matchList = new StringBuilder();
        private int loop = 0;
        private int matches = 0;
        public Matchlist()
            sd.createstudentdetails();
        /** Method to create the actual match list, returns the list as a string */
        public String CreateMatch()
            int g;
            int y;
                for (g = 0; g < 4; g++)//g = game
                    for (y = 17; y > -1; y--)//y = green house
                        /** Check to see if the game is empty */
                        if (sd.getgh(y).getGame(g).equalsIgnoreCase(""))
                            for (int x = 0; x < 18; x++) //x = yellow house
                                if (sd.getyh(x).getGame(g).equalsIgnoreCase(""))
                                    if (sd.getgh(y).getC_lass() != sd.getyh(x).getC_lass())
                                        /** Check to see if the person has played the other person */
                                        if (sd.getgh(y).checkPlayed(sd.getyh(x).getName()) == false)
                                            /** Set the game to the name of the opponent played */
                                            sd.getyh(x).changeGame(g, sd.getgh(y).getName());
                                            sd.getgh(y).changeGame(g, sd.getyh(x).getName());
                                            /** Build the match list step by step using append with \n at the end to create a new line */
                                            matchList.append(sd.getyh(x).getName() + " vs " + sd.getgh(y).getName() + "\n");
                                            matches++;
                                            break;
                /** Convert the stringbuilder into an actual string, then return it */
                String completeMatchList = matchList.toString();
                System.out.println(matches);
                for (int i = 0; i <18; i++)
                    sd.getyh(i).getEmptyMatches();
                    sd.getgh(i).getEmptyMatches();
                return completeMatchList;
        }what i dont understand is how to implement it to pick my matches at random using the http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html java tutorials from here
    regards

    How to use Random ?
    First you open API then you read it, then you use it.
    You mention you try to use it but i just see a horrible nested for for for if if if loop.
    Restructure code and question and maybe it makes more sense.
    Edited by: pgeuens on 10-mrt-2008 22:58

  • How to using the executable software in Java

    I got a software named: pdf to text convertor; which can format the text interface from the pdf, for example, you need add the page number with a4 paper, then the convertor can change the pdf into text with page numbers. it is running on the doc, the command like: c:\pdfconvertor\xpdfrc.exe "c:\filename\name.pdf", after the text file will exist in the same directory with the pdf file.
    so my problem is how to use java to call this DOS command to execute the program, and then java can read the text file, does some one give me some idea? better with simple java code!! Thanks very much! I will pay dollar for the solutions

    You can use:
    String[] cmd = {"c:\\pdfconvertor\\xpdfrc.exe", "c:\\filename\\name.pdf"};
    Process p = Runtime.getRuntime().exec(cmd);Wait for the process to finish:
    p.waitFor()and do your thing with the output file.
    Note there are mechanisms for capturing the input and output of the subprocess; see java.lang.Process javadoc.

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • How to use the Rc4DLL.dll with java (jre1.4 )

    I am not able to use Rc4DLL.dll with java, there are some characters (encrypted using Rc4DLL.dll) that java is not able to identify. So while decrypting in java using Rc4DLL I am not getting the desired output (as some character java tries to decrypt are not supported with java). Could some one give a solution of using Rc4DLL with java jre 1.4

    RC4 cipher is supported by 1.4.
    And surely you can turn a link to the 1.5.0 JCE Reference Guide into a link to the 1.4.2 Reference Guide? I did. Took me 5 seconds to check that. As opposed to wasting a day and a half in forums like you just did.

  • About HR infotype 0024, How to use the function moudle:RHPP_Q_PROFILE_WRITE

    Hi:
    About HR infotype 0024,As qualification data goes to the OM Infotypes, How to use the function moudle:RHPP_Q_PROFILE_WRITE?
    thank you.

    thank you and the 'BAPI_QUALIPROF_CHANGE' can wok.
    DATA:it_profile_add TYPE bapiqualific_tab OCCURS 0 WITH HEADER LINE,
         it_profile_delete TYPE bapiqualific_tab OCCURS 0 WITH HEADER LINE,
         it_return TYPE bapireturn1 OCCURS 0 WITH HEADER LINE.
    it_profile_add-obj_id = '20000116'.  "Q ID
    it_profile_add-rating = '0001'.      "精通程度
    APPEND it_profile_add.
    CALL FUNCTION 'BAPI_QUALIPROF_CHANGE'
      EXPORTING
        plvar                = '01'
        otype                = 'AP'  "申请者
        sobid                = '00000170' "PERNR NUMBER
    IMPORTING
       return               = it_return
      TABLES
        profile_add          = it_profile_add
        profile_delete      = it_profile_delete
      ERR_PROFILE          =
      CHANGE_PROFILE       =
    READ TABLE it_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE 'FAILED' TYPE 'I'.
    ELSE.
      MESSAGE 'SUCCESS' TYPE 'I'.
    ENDIF.

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • How to pass the report parameters through java not by using URL

    Hello...
    I have an oracle App. Server 10g with report service
    I can the report using the URL :
    http://host:Port/rwservlet/report=....
    and passing the report parameters ...
    But is there any way to call the report by pdf format and passing the parameters from java without using the url ???

    thank you shahcsanjay for your reply
    but I think that web.showDocument can not be used by ordinary java web application ..
    I think it can be used only with with "oracle forms" Am I right ?
    If no can you please tell me where can I find a useful document about how to use web.showDocument ...
    thanks again
    Saleem

  • How to use the Java embedding activity in BPel

    hi all,
    How to use the java embedding activity in BPEL
    pls can u provide sample example

    1 Use [Oracle BPEL Process Manager Client Java API Reference|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/overview-summary.html] and especially [com.collaxa.cube.engine.ext|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/com/collaxa/cube/engine/ext/BaseBPELXExecLet.html]
    Instead of System.Out.println use addAuditTrailEntry(java.lang.String message)
    2. If you want to import a package write in code (Source View) of bpel process
    +<bpelx:exec import="package_name"/>+ for example +<bpelx:exec import="java.util.regex.Matcher"/>+
    example 1:
    String bodyAsString;
    StringBuffer myStringBuffer = new StringBuffer();
    try {
    bodyAsString = (String)getVariableData("BodyString");
    addAuditTrailEntry("bodyAsString1: "+ bodyAsString);
    Pattern pattern = Pattern.compile("goodDay");
    Matcher matcher= pattern.matcher(bodyAsString);
    while (matcher.find()) {   
    matcher.appendReplacement(myStringBuffer, "shitDay");
    matcher.appendTail(myStringBuffer);
    bodyAsString = myStringBuffer.toString();
    addAuditTrailEntry("bodyAsString2: "+ bodyAsString);
    } catch (Exception ex) {
    addAuditTrailEntry("Failed+bodyAsString",ex.getMessage());
    I put in code (Source View) the following
    <bpelx:exec import="java.util.regex.Matcher"/>
    <bpelx:exec import="java.util.regex.Pattern"/>
    example2:
    Object temp;
    try {
    temp = ((XMLElement)getVariableData("inputVariable","payload","/ns2:FiscalisMessage/ns2:Body")).getChildNodes().item(1);
    setVariableData("AdjReceipt",temp);
    addAuditTrailEntry("ok",temp.toString());
    catch (Exception ex) {
    addAuditTrailEntry("Failed :",ex);
    I put in code (Source View) the following
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>

  • How long a message can be sent via TCP using the TCP Read VI?

    Hello,
    How long can be a message sent between a TCP server and a TCP client using the TCP Read VI (LV2013)? There is a certain limit?
    Thank you.

    I think it just depends on your hardware's buffer size.  TCP sets limits on the size of packets that can be seent.  What are you trying to do?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • How to check the output of a java card program ?

    Hi,
    I am new to java card technology.I am trying to run a simple helloworld program given in the java development kit2.2 -windows samples in eclipse3.5.
    For running I followed the following steps:-
    1) Firstly,I went to JCWDE->start
    2) then on Project->java tools->deploy
    It shows me following output :-
    Java Card 2.2.2 APDU Tool, Version 1.3
    Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    Opening connection to localhost on port 9025.
    Connected.
    Received ATR = 0x3b 0xf0 0x11 0x00 0xff 0x00
    CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 09, a0, 00, 00, 00, 62, 03, 01, 08, 01, Le: 00, SW1: 90, SW2: 00
    CLA: 80, INS: b0, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
    CLA: 80, INS: b2, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
    CLA: 80, INS: b4, P1: 01, P2: 00, Lc: 18, 01, 00, 15, de, ca, ff, ed, 01, 02, 04, 00, 01, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 01, Le: 00, SW1: 64, SW2: 3a
    CLA: 80, INS: bc, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 20, 02, 00, 1f, 00, 15, 00, 1f, 00, 0f, 00, 15, 00, 36, 00, 0c, 00, 69, 00, 0a, 00, 14, 00, 00, 00, 6c, 00, 00, 00, 00, 00, 00, 02, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 02, 01, 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 04, P2: 00, Lc: 18, 04, 00, 15, 02, 03, 01, 07, a0, 00, 00, 00, 62, 01, 01, 00, 01, 07, a0, 00, 00, 00, 62, 00, 01, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 03, P2: 00, Lc: 12, 03, 00, 0f, 01, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, 00, 14, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 06, P2: 00, Lc: 0f, 06, 00, 0c, 00, 80, 03, 01, 00, 01, 07, 01, 00, 00, 00, 21, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 07, 00, 69, 00, 02, 10, 18, 8c, 00, 01, 18, 11, 01, 00, 90, 0b, 87, 00, 18, 8b, 00, 02, 7a, 02, 30, 8f, 00, 03, 3d, 8c, 00, 04, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 8b, 00, 02, 7a, 05, 23, 19, 8b, 00, 05, 2d, 19, 8b, 00, 06, 32, 03, 29, 04, 70, 19, 1a, 08, ad, 00, 16, 04, 1f, 8d, 00, 0b, 3b, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 16, 04, 1f, 41, 29, 04, 19, 08, 8b, 00, 0c, 32, 1f, 64, e8, 19, 8b, 00, 07, 3b, 19, 16, 04, 08, 41, 8b, 00, 08, 19, 03, 08, 8b, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 0c, 00, 09, 19, ad, 00, 03, 16, 04, 8b, 00, 0a, 7a, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 08, P2: 00, Lc: 0d, 08, 00, 0a, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 20, 05, 00, 36, 00, 0d, 02, 00, 00, 00, 06, 80, 03, 00, 03, 80, 03, 01, 01, 00, 00, 00, 06, 00, 00, 01, 03, 80, 0a, 01, 03, 80, 0a, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 19, 06, 03, 80, 0a, 07, 03, 80, 0a, 09, 03, 80, 0a, 04, 03, 80, 0a, 05, 06, 80, 10, 02, 03, 80, 0a, 03, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b2, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: b4, P1: 09, P2: 00, Lc: 17, 09, 00, 14, 00, 03, 0e, 27, 2c, 00, 0d, 05, 0c, 06, 04, 03, 07, 05, 10, 0c, 08, 09, 06, 09, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: bc, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    CLA: 80, INS: ba, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
    Can anyone tell me what is this output? And Am i deplyoing in the right way?

    Hi,
    You might want to check the JCDK user guide (cJDK_Users_Guide_bin_do.pdf) for details of using an emulated card environment. It outlines how to use the simulators provided with the JCDK. This should tell you how the deploy process works and will give you some insight into what this script is doing.
    Cheers,
    Shane

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • How to use the Calculated attibute in view object

    Hi,
    I have a view object query with the calculated attribute name as 'TRANCODE' in the below sql.This query works for the initial page loading.
    After the page gets loaded, there is a search section in the same page at the top.
    Here i will have to build the whereclause to the same query and retrieve the values.
    i am using jDeveloper 10.1.3.1, with adf and jHeadstart.
    Can some one tell as how to use the calculated attribute TRANCODE in whereclause?
    SELECT /*+ first_rows(10) */
    BatchCntl.FILE_CNTL_ID,
    CASE WHEN chk_bit(Entry.ENTRY_FLAGS, 2)='Y' OR Entry.ENTRY_SUBSTATUS = 'D' OR Entry.ENTRY_SUBSTATUS = 'J'
    THEN
    CASE eeh.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE eeh.TRAN_CODE
    END
    ELSE
    CASE Entry.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE Entry.TRAN_CODE
    END
    END AS TRANCODE,
    FROM Batch_Cntl BatchCntl, Entry, ENTRY_EDIT_HIST eeh
    WHERE (BatchCntl.BATCH_TYPE = 'E')
    AND (BatchCntl.BATCH_STATUS in ('A','D','R','P'))
    AND entry.in_batch_cntl_id = BatchCntl.BATCH_CNTL_ID
    and Entry.fi_rt = eeh.fi_rt (+)
    and Entry.entry_id = eeh.entry_id (+)
    AND (Entry.ENTRY_STATUS in ('A','D','R','P'))
    ORDER BY BatchCntl.BATCH_CNTL_ID, Entry.entry_id
    regards
    Raj.

    Let's say your application module is com.yourcompany.someapp.services.MyService, and let's say you authored a method like the following in the MyServiceImpl.java file:
      public void doSomething(int i, String s) {
      }and you exposed this AM custom method using the AM editor.
    BC4J design time will automatically create you the com.yourcompany.someapp.services.common.MyService interface that will look like this if you go look at the source code:
    package com.yourcompany.someapp.services.common;
    import oracle.jbo.ApplicationModule;
    public interface MyService extends ApplicationModule {
      public void doSomething(int i, String s);
    }To use your custom method from a client, just cast your ApplicationModule to your custom interface like this:
    import com.yourcompany.someapp.services.common.MyService;
      MyService mySvc = (MyService)yourAM;
      mySvc.doSomething(1,"foo");

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

Maybe you are looking for

  • Kt4v w/geforce4 ti 4200

    I have a kt4v via kt400 chipset based MSI board that I purchased 2 weeks ago online.  I have had nothing but problems and I believe the problem is with the MB. With the MB I purchased an AMD 2400+ CPU plus 333Mhz 2700 DDR Ram.  I have a GeForce4 TI 4

  • Howto filter SharePoint 2010 list by current display language / LCID?

    I want to define a list-view to filter rows of a list based on the curently selected language in sharepoint MUI. Is this possible? Maybe i can use a calculated column with formula? Are there any variables for LCID i could use in formula? List-Sample

  • ORA-00205: error in identifying control file, check alert log for more

    I am trying to upgrade database software from 11.2.0.1 to 11.2.0.2 and followed the steps given in the Doc ID 1276368.1 in linux 86 OS environment . I am in step 9 where i need to start up the database in startup upgrade mode. I get the the following

  • Re: Lockscreen or background color remains exactly...

    I have bought a Lumia 730(dual sim) just 3 days ago and was trying to personalize my 'start-background' and the 'lock-screen' with selected pictures saved in my phone SDcard. I have followed all the steps for the same (as described in "lumia Help + T

  • Multi-row block with many image-java-beans

    Hi, I want to create a multi-row block based on a table, e.g. emp with 5 records. Then I want to add 5 java-bean images in the same block. Now I want to read from the db-table emp the blob-column with the image of the corresponding empno. Is this pos