Results 1 to 4 of 4
  1. #1
    UnknownFear is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Question Jikes Compiler - iPhone

    Hello all. I recently instaled a Java compiler called Jikes on my iPhone. Works pretty well, can write simple "println" programs using the built-in text editor. However, I can not write programs to get input from the user. I tried using Scanner and BufferedReader, but no luck. Does anyone have any idea if it's possible to actually put a Scanner.jar file in the iPhone and make it work?

  2. #2
    Hello World is offline Member
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Default

    how did you install it on your iphone?

  3. #3
    UnknownFear is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Red face

    Quote Originally Posted by Hello World View Post
    how did you install it on your iphone?
    I have a jailbroken iPhone 3GS and installed it via Cydia.

    All I want to do is be able to write programs where I can get input from the user. I guess, in the long run it's no big deal, as I also have Python installed and it works flawlessly, but I would like the Java issue to be resolved as I know more Java than Python.

  4. #4
    UnknownFear is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Question

    I have gotten able to run it using BufferedReader, lang and util packages and it compiles perfectly, but when I go to run it, it gives me an error with a package. Can someone help me with this? I really want to be able to make user-input programs.

    Hear is the code I have:

    //*Input
    //*Input*information*and*display*to*screen

    import*java.util.*;
    import*java.io.*;
    import*java.lang.*;

    class*HelloInput{
    *****public*static*void*main(String*args[])*throws*IOException{
    *****BufferedReader*read*=*new*BufferedReader(new* InputStreamReader(System.in));

    *****String*name;

    *****System.out.print("What*is*your*name?");
    *****name*=*read.readLine();
    *****System.out.println("Hello,*"*+*name);
    *****read.close();
    *****}
    }


    Here is a link to the picture of the error:
    http://twitxr.com/image/316279/

Similar Threads

  1. introduction for tutorial of iphone programming
    By JamesEdu in forum Reviews / Advertising
    Replies: 0
    Last Post: 11-23-2009, 10:35 AM
  2. compiler,JIT compiler & interpreter
    By gamilah in forum New To Java
    Replies: 4
    Last Post: 11-04-2008, 12:32 AM
  3. Java and the iPhone
    By Zosden in forum Forum Lobby
    Replies: 10
    Last Post: 06-25-2008, 06:31 AM

Posting Permissions

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