tags:

views:

48

answers:

3

This is very strange ., when i try to run the cod of user input

    import java.util.Scanner;

class apples{
 public static void main(String args[]){
  Scanner villy = new Scanner(System.in);
  System.out.println(villy.nextLine());
 }
}

nothing happens http://yfrog.com/myerror2op

What i mean is that i want to appear the pop-up down where you see if the code runs correctly http://yfrog.com/ncgdt1p

+1  A: 

Worked for me. Are you typing into the console first? It should print what you type.

You may also want to try the following change, so that this works more than once:

import java.util.Scanner;

class apples{
 public static void main(String args[]){
     while(true){
            Scanner villy = new Scanner(System.in);
            System.out.println(villy.nextLine());
     }
 }
}
nolegs
Yes i typing in the console first, if you look at the sreenshot you can see that i try to run it, but does not start and with the another code it runs perfectly
+1  A: 

It looks like your problem is that your console window isn't displayed. From Eclipse select Window -> Show View -> Console and try again.

With the console displayed it should display back whatever you type.

SOA Nerd
I dont see this option http://yfrog.com/2ccons1p - I run eclipse in Windows 7
Maybe under the 'Other'. Another way to try this from Eclipse is to use the shortcut by pressing Alt+Shift+Q and selecting C.
SOA Nerd
Still not working http://yfrog.com/06cons5ap
A: 

In Eclipse select File-> New Project. From the list select "Plug-In Project".

Press next and select the template "Hello RCP"

Press next and select "Add branding" and press Finish.

As a result a project with the following project structure will be created -> Try to run again the "User Input"

brandoncod
I think that has nothing to do ., Still NOT working :( -