Jdeveloper Program Input

I'm learning to work with Java, and i've downloaded and installed JDeveloper 10.1.3.2
I'm trying to run a simple program that accepts user input using the java.util.Scanner class, and exits a sentinel controlled loop when the user enters CTRL-C sequence.
I'm unable to input the windows end-of-file character in the program input window (JDeveloper) so i can exit the while loop below. The window accepts all other characters except the CTRL-C character sequence in windows.
Please how does a user exit this loop in the \\\jdev
while (input.hasNext()) { //loop until EOF character
try {
//retrieve data to be input
record.setAccount(input.nextInt());
record.setFirstName(input.next());
record.setLastName(input.next());
record.setBalance(input.nextDouble());
if (record.getAccount() > 0) {
output.format("%d %s %s %.2f\n", record.getAccount(),
record.getFirstName(), record.getLastName(),
record.getBalance());
} else {
System.out.println("Account number must be greater than 0");
} //end try
catch (FormatterClosedException e) {
System.err.println("Error writing to file.");
return;
} catch (NoSuchElementException e) {
System.err.println("Invlaid input. Please try again.");
input.nextLine();
System.out.printf("%s %s\n%s", "Enter account number (>0), ",
"first name, last name, and balance.", "? ");
} //end while
//...

Hi,
ctrl+c usually terminates running programs, which is why I sufggest to try another end of program key like ESC
Frank

Similar Messages

  • How to add Freely programmed input help in FPM Search UIBB?

    Hi Experts!
    We have a requirement to create search UIBB in which the input field should have a freely programmed input help.
    I see that WD_VALUE_HELP parameter can be set to the component name and it displays the freely programmed help as well in the application.
    However, I am still digging to implement the search help open and close events of the component.
    I have used the Freely programed value help standard demo object  " FREE_VALUE_HELP "  which shows the value in the help popup however, the selected value is not returned in the input field.
    I am also unable to find any Interface as provided for implementing OVS in search UIBB as well...
    Please help.

    Hi Aliaksandr,
    Thanks for your response.
    I have checked this WDA application demo_value_help .... but it is a normal WDA application.
    However, I want use freely programmed search help in Search UIBB using FPM.
    I found that we can provide the component name used as freely programmed search help in the attribute WD_VALUE_HELP of Interface IF_FPM_GUIBB_SEARCH.
    https://help.sap.com/saphelp_nw74/helpdata/en/03/f2474b6d9a49f4b5a3ed6f04decf22/content.htm?frameset=/en/56/d151c3ba7b4b2e82068a084cb991f3/frameset.htm
    And it displays the search help as well when I do F4 on the field of Search UIBB. But, we need to provide event handler for events - VH_WINDOW_CLOSED and VH_WINDOW_OPENED of the search help component (Component which is provided in WD_VALUE_HELP) some where in the Feeder class, in order to get the selecteed data from the search help, which I am unable to do.
    Do you have any idea of such implementation?
    Appreciate your response!

  • Help required on Freely Programmed Input help

    Dear all,
    I have developed a component, say comp1, in which i have implemented the interface IWD_VALUE_HELP.
    In the respective view(MAIN) of Comp1 i have a dropdown which contains a list of company codes fetched from T001 table.
    Apart from these two, I have also embedded the Main view into the window WD_VALUE_HELP.
    Now, I have created another component, say Comp2, in which i Used the dynpro component Comp1, and also in the MAIN view of my Comp2. Now in the MAIN view of Comp2 I have created a input field from the node T001 in the context which contains the single attribute BUKRS type String. In the properties of the BUKRS attribute I have also changed the Input help to "Freely Programmed" and linked to the component for the Input help.
    After this, I have created the application for my component Comp2. When i run the application and when i press F4 on the input field i am able to get the window from Comp1 component, and a dropdown with values.
    Now the question is, How can i pass the value selected in that window of Comp1 into the input field of Comp2? we do the same in OVS, when ever a value is selected from the Hitlist, it will be cascaded into the input field, just like that i want to do here.
    Please suggest me how to do this, and also please tell when to go for Freely programmed Input help and its advantages.
    Thank you,
    Shashi.

    You can do as suggested already and use interface nodes and cross component mapping; but that is all really not necessary.  It creates a situation where you calling application is too dependent upon the freely programmed input help.  You want to try to avoid the situation where the calling application needs code or mappings to communicate with the input help.
    That is easy to do because the framework passes all the information you need into the freely programmed input help via the value_help_listener object. 
    Part of the Freeley Programmed Input Help Component should be the component interface IWD_VALUE_HELP.  This comes with a component controller method called SET_VALUE_HELP_LISTENER.  This allows your freely programmed value help to capture this object called listener of type IF_WD_VALUE_HELP_LISTENER. I generally just store it awa into a component controller attribute.
    With this listerner object you have direct access to the context attribute in the calling component. You can query information about the calling UI element and of course set values directly back into it.  The listener is a hugely helpful object and should be the way you interact with the calling component whenever possible.  Here is small example:
      set single attribute
      wd_this->value_help_listener->f4_context_element->set_attribute(
      exporting
        name = wd_this->value_help_listener->f4_attribute_info-name
        value = l_time

  • Freely Programmed Input help

    Hi all,
    I want to use Freely Programmed Input help.any ideas how to use this type of input help.Also suggess about its properties in context.
    Points will be sured.
    Sanket sethi

    Hi,
    see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm">documentation</a>
    Regards, Heidi

  • Freely programed input help

    hi all,
    can any buddy tell me how can i use freely programed input help..
    please give steps to create and use it.
    points will be awarded
    thanks
    ashish

    Hi,
    see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm">documentation</a>
    Regards, Heidi

  • How to run a Java class in JDeveloper - with Input parameters

    Folks,
    I need to run Forms 10g trace and do not have access to the Dos command line (no Programs-ACcessories-Comand prompt). I am allowed to run Batch files though.
    So really I need to run class "oracle.forms.diagnostics.Xlate", but need to give Input Parameter to this class. I know to load JDeveloper and open this class, but when I execute it it gives me the following error.
    My question is HOw do I input the File name to this Class when I execute it from JDeveloper.
    ERROR: You must specify an input datafile
    Exception in thread main
    java.lang.NoClassDefFoundError: oracle/forms/registry/MessageManager
         at oracle.forms.diagnostics.Xlate.printUsage(Unknown Source)
         at oracle.forms.diagnostics.Xlate.readArgs(Unknown Source)
         at oracle.forms.diagnostics.Xlate.<init>(Unknown Source)
         at oracle.forms.diagnostics.Xlate.main(Unknown Source)
    Process exited with exit code 1.

    To specify program arguments
    1. Select Tools>Project Properties.
    2. Select Run/Debug.
    3 Select the Default Configuration and select Edit.
    4. Specify the program arguments in the Program Arguments field.

  • Dialog Programming : Input value

    Hi Experts,
    I have programmed a Dialog programe.
    In my input Screen i have a field called 'New Project'. ( PROJ-PSPID)
    The user must not be able to enter value directly into this field but must always be able to select it from the F4 HElp.
    I'm using the Function module  'CN_SUCHE_FREIE_NUMMER'  as F4 help for the field 'NEW_PROJECT' ( to obtain the next available project number.), in the event Process on value request.
    But I should not allow the user to enter any value directly, instead he must always select from the F4 Help.
    I have seen many post, but the answer is provided when they r using the Function module 'F4IF_FIELD_VALUE_REQUEST'.
    But my F4 help Func module is different , it is 'CN_SUCHE_FREIE_NUMMER'.
    Thanks in Advance,
    Vidya

    Hi All,
    Thanks for the replies.
    The function maodule 'CN_SUCHE_FREIE_NUMMER' needs the user to press the 'Find' button , hence i need to provide it to the user, such that he does the action, if you can jst plz check out the FM 'CN_SUCHE_FREIE_NUMMER', it would be of great help .
    Also,
    I cannot predict the next project number available (as it is dynamic ,determined from the number range), hence i cannot provide the list nor drop down
    The requirement is to get the next project number available during creation of the project(CJ20n)( Custom program is been done : BDC program ) .
    Wish to get your inputs,
    Vidya

  • Module pool program input field

    Hi friends,
    I took a input field in the screen and named it as match, I need to pass the sum of the values capture in a variable v_total to that field. Can u tell me how to do this, coz I tried but unable to display the sum value on the screen.
    Regards,
    Line

    hi line,
      i guess the input field is on the second screen or ,you may want to show the
    value on the input field after you do a commad. i suggest you use the memory id
    when defineing the input field give a memory id to id . and in the program you export the value v_total to the same memory id .
    if this not work well try to use FM DYNP_VALUES_READ
    and DYNP_VALUES_UPDATE
    regards.

  • POWL: Freely Programmed Input help for Selection Criteria possible

    Hi,
    is it possible to add a freely programmed value help to a POWL-selection field? In this case the use of OVS is unsufficient from the user perspective.
    Can anybody guide me?
    Thanks, Elke.

    I dont intend to create another search help component for my 2nd input field because if let say i have 20 input fields that requires search help, does that means I need to create 20 search help components and embed 20 of them into my parent component?
    NO need of creating 20 more search helps if you have these 20 attributes in the result table of the value help.
    just check in the help from where the help is getting called and then pass the value accordingly.
    here is a sample code where i am checking whether the search help is called from ID field or Location field and then passing
    the required info back.
    lo_listener = wd_comp_controller->value_help_listener.
    lv_attrib_name = lo_listener->f4_attribute_info-name.
    IF lv_attrib_name EQ 'ID'.
    lo_listener->f4_context_element->set_attribute( value = lv_id
    name = lv_attrib_name ).
    ENDIF.
    IF lv_attrib_name EQ 'LOCATION'.
    lo_listener->f4_context_element->set_attribute( value = LOC
    name = lv_attrib_name ).
    ENDIF.
    wd_comp_controller->fire_vh_data_selected_evt( ).
    thanks
    sarbjeet singh

  • Firefox can not read Hotmail messages and some other program input fields (Hotmail OK if add-ons disbled)

    Yesterday Hotmail was fine under Firefoax, today messages cannot be opened, cannot access bank account customer number, cannot enter text into comments section in newspaper. Can access Hotmail and newspaper comments on Opera. But I can access Hotmail on Firefox if I start up with add-ons disabled option, but when disable all add-ons individually on Firefox normal access, it's back to not working again. Have also gone back 4 updates on Windows Vista Home Basic and disabled the excellent Rapport bank security. Tried to disable Foxit reader previously (as older posts advised) and no difference. Any ideas ?, In the meantime will keep Opera open for Hotmail and try access bank tomorrow. Thanks all.

    Thanks Jcher2000 and cor-el for your suggestions, I think have solved the mystery, Firefox add-ons were all ok, but EXTENSIONS contained a program called Price-Peep which has caused the problem. Solved by elimination;
    Shut down ALL Add-ons AND extensions, Hotmail worked, re-introduced all Add-ONs, one at a time, all worked OK, then did the same with extensions, worked down the list and, at the second to last (how unusual), Hotmail stopped working with Pricepeep enabled, then restarted with it Ppee disabled, checked the last program and all still working in Hotmail. I have just looked at the Pricepeep site and I think it was added when I took delivery of a spare webcam which didn't have software so downloaded software from the web (cannot check back site as have cleared all history caches in sorting this mes) so ise people NOT to agree to download this crap. Just emailed the idiots )© 2012 Verti Technology Group). Now, how do I report this to Mozilla and Hotmail ?... Thanks folks, from a very pissed off person in France...Colin.

  • User input in JDeveloper IDE not working?

    We just started to use JDeveloper. so the problem may be very basic, I could not figure it out what is wrong:
    I have a java class which is calling a third part application (Lotus Notes, domino server). The task of the class is to open a database on domino server(or local machine). When calling domino, there is a user(calling) authorization. So I must input the password for the domino server for authorization. When I input the password in input panel and hit return, nothing happened. It looks the Domino still wait for the password. It waited and waited and the process can not be stopped itself.
    when I copied the same code and ran in other IDE or Sun's JDK. It worked fine.
    So it looks that my JDeveloper could not pass user' input to the process?
    Any helps are highly appreciated.
    George

    Hi George,
    Let me make sure I understand what you are saying.
    You want to run (or debug) your program which reads input from System.in?
    If so...
    Have you checked the checkbox in the Project Settings Dialog - Runner - Options panel "Allow Program Input"? Then when you ran (or debugged) your program, did you see a text field labeled "Input:" in the Log window for your running process?
    Did you enter the password in that text field and press Enter on your keyboard?
    If that wasn't the problem, can you give us step by step what you are doing?
    Thanks,
    Liz

  • INPUT THE END-OF-FILE CHARACTER/ CRTL-C in Jdeveloper

    I'm trynta input the end-of-file character in the program input window (JDeveloper) so i can exit the while loop below. The window accepts all other characters except the CTRL-C character sequence in windows. How does the user exit this loop?
    while (input.hasNext()) { //loop until EOF character
    try {
    //retrieve data to be input
    record.setAccount(input.nextInt());
    record.setFirstName(input.next());
    record.setLastName(input.next());
    record.setBalance(input.nextDouble());
    if (record.getAccount() > 0) {
    output.format("%d %s %s %.2f\n", record.getAccount(),
    record.getFirstName(), record.getLastName(),
    record.getBalance());
    } else {
    System.out.println("Account number must be greater than 0");
    } //end try
    catch (FormatterClosedException e) {
    System.err.println("Error writing to file.");
    return;
    } catch (NoSuchElementException e) {
    System.err.println("Invlaid input. Please try again.");
    input.nextLine();
    System.out.printf("%s %s\n%s", "Enter account number (>0), ",
    "first name, last name, and balance.", "? ");
    } //end while
    //...

    Hi,
    U need to use one class. Refer below given code.
    TYPES : BEGIN OF lt_record_input,
              rec(1000) TYPE c,
            END OF lt_record_input.
    DATA : li_record_input TYPE TABLE OF lt_record_input .
    DATA lv_cr TYPE c.
    lv_cr = cl_abap_char_utilities=>cr_lf.
    CONCATENATE '/opt/isv/cti_app/DOCU/INCOMING/PROCESSED/UNSUCCESSFUL/'
    gv_filename INTO lv_path.
    OPEN DATASET lv_path FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc = 0.
      DO.
        READ DATASET lv_path INTO lw_record_input-rec.
        IF sy-subrc EQ 0.
          REPLACE lv_cr IN lw_record_input-rec WITH space.
          APPEND lw_record_input TO li_record_input.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET lv_path.
    ENDIF.
    Hope it help u.

  • User interaction with jdeveloper

    Hi, I am new to jdeveloper and have a couple of relatively simple programs up and running on it. Other than from the command line is there a way a user can interact with a basic program where the program prompts the user for input. I have used Jbuilder before and with JBuilder once you run your program the user can input required details in the debug window

    Hi Joe,
    Before you start running (or debugging, profiling, or code-coaching), you need to check a box in the project settings dialog. In the Project Settings dialog, select Runner - Options on the left and then check the "Allow Program Input" check box (at the bottom of the panel).
    When you start running (etc), the log window will contain a text field labeled "Input:" where you can enter program input (it's at the bottom of the log window). When you enter input, press "Enter" to send the text to the running program.
    -Liz

  • I can't see the input field/tab

    I'm learning to work with Java, and i've downloaded and installed JDeveloper 10.1.3.2
    I'm trying to run a simple program that accepts user input using the java.util.Scanner class.
    The program compiles without errors or warnings, but when run, it prompts the user for input but JDeveloper doesn't display the input field at the bottom of the messages window.
    PS: The same program runs in Netbeans 5.0 without any errors, and displays the input field.
    Please how do I fix this problem.

    Sorry.... typed too quickly...
    Double-click project to bring up project properties
    Click Run/Debug in the left pane, click "Edit" in the right pane to edit the config
    Click on "tool settings" in the left pane, then select the "Allow Program Input" in the middle pane.
    Hope this helps

  • End.of.file character sequence in jdeveloper

    I'm unable to input the windows end-of-file character in the program input window (JDeveloper) so i can exit the while loop below. The window accepts all other characters except the CTRL-C character sequence in windows. How does a user exit this loop in the \\\jdev
    while (input.hasNext()) { //loop until EOF character
    try {
    //retrieve data to be input
    record.setAccount(input.nextInt());
    record.setFirstName(input.next());
    record.setLastName(input.next());
    record.setBalance(input.nextDouble());
    if (record.getAccount() > 0) {
    output.format("%d %s %s %.2f\n", record.getAccount(),
    record.getFirstName(), record.getLastName(),
    record.getBalance());
    } else {
    System.out.println("Account number must be greater than 0");
    } //end try
    catch (FormatterClosedException e) {
    System.err.println("Error writing to file.");
    return;
    } catch (NoSuchElementException e) {
    System.err.println("Invlaid input. Please try again.");
    input.nextLine();
    System.out.printf("%s %s\n%s", "Enter account number (>0), ",
    "first name, last name, and balance.", "? ");
    } //end while
    //...

    Hi,
    That charecter comes in the last field in the file as it is the end , so write a code in transformations from PSA to DSO of the last  field.
    Here i am giving the code that needs to be included in the field routine.
    DATA : INT_VAR TYPE /BI0/OIMATERIAL. (give your field insted of material)
    DATA : STR_VAR1(20) TYPE C. (give your field type here)
    DATA : VAR2 TYPE I.
    DATA : VAR3 TYPE I.
    DATA : VAR4 TYPE I.
    DATA : STR_VAR6(20) TYPE C.
    MOVE SOURCE_FIELDS-MATERIAL TO INT_VAR.
    TRANSLATE INT_VAR TO UPPER CASE .
    IF INT_VAR CN
    ',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890' .
    STR_VAR1 = INT_VAR+0(SY-FDPOS).
    VAR2 = STRLEN( INT_VAR ).
    VAR3 = SY-FDPOS + 1.
    VAR4 = VAR2 - VAR3.
    STR_VAR6 = INT_VAR+VAR3(VAR4).
    CONCATENATE STR_VAR1 STR_VAR6 INTO RESULT.
    ELSE.
    RESULT = INT_VAR.
    ENDIF.
    Hope this works good in your case
    Cheers,
    Srinath.

Maybe you are looking for

  • Feedback for SAP TechEd, SDN Day, SDN Clubhouse - Las Vegas

    Please give us your feedback and thoughts on the event, Clubhouse and SDN Day.

  • Printing passport photos in Photoshop Elements 11.

    I want to print a set of 8 passport photos on a single sheet of A4 paper. I have already sized it as 3.5cm x 4.5cm and I am having problems using Adobe Photoshop Elements 11 in Editor mode. Does anyone know how to do this?

  • How to use the FM named 'CP_EX_PLAN_READ_INTERVAL'

    Hi sirs, Can u please suggest that how can I use FM 'CP_EX_PLAN_READ_INTERVAL' for retriving the relavent data from PLKO and PLPO. I need the example of using this FM. Thanks in advance, Dinesh

  • DAQ question

    Hi NG, I was hoping that some kind soul would grace me with some in- struction or some pointers to links or something. Problem: I'm running an SCXI chassis with multiple(5) cards in it. Two of the cards are 1120's. One of 1120 modules is in slot one

  • QuickTimeJavaExtras.qtx?!?!

    When I try to reinstall iTunes , the message "Error writing to file: C:\Program Files\Quicktime\QTSytem\QuickTimeJavaExtras.qtx. Verify you have access to this directory" comes up. What do I do? I tried uninstalling but that didnt work. I tried to de