Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2012

    How to work with standard input?


    I am a very beginner with developing Nokia applications with java.
    I was looking for very simple code examples, but only find very complicated stuf.
    Just starting using simple standard input and output.

    The first problem I encounter is, that I can work with standard output (System.out), but the Nokia SDK doesn't recognize things like System.in?
    A simple piece of code:

    System.out.print("Enter your name: ");

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    doesn't work.
    (I did the import: import java.io.*; )
    Even BufferedReader is not known...

    I wrote already a simple text-based game and wanted to bring it to my Nokia, but not all code can be re-used?

    thanks for your help!
    Last edited by vinkje; 2012-11-02 at 13:39.

  2. #2
    Registered User
    Join Date
    Mar 2003

    Re: How to work with standard input?

    System.in does not work in Java 2 Micro Edition. On a phone, it is complete invisible. You have to move to LCDUI. If your Java code follows the model-view-controller principle, you are able to port much of your Standard Edition code. Nevertheless, J2ME is quite different but not too difficult. Give it a 2nd chance.

Similar Threads

  1. Standard input in QT
    By jkyro in forum Qt
    Replies: 5
    Last Post: 2011-04-07, 17:29
  2. "-wap-input-format:*N" does not work fine in password field
    By l1l10o0o0o in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2007-05-23, 17:14
  3. Some C Standard functions don't work
    By lazmous in forum Symbian
    Replies: 1
    Last Post: 2005-03-04, 19:42
  4. input type image does not work correctly
    By urbiman in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2004-11-04, 16:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts