Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line application on Raspberry #66

Open
lgLindstrom opened this issue Oct 6, 2016 · 7 comments
Open

Command line application on Raspberry #66

lgLindstrom opened this issue Oct 6, 2016 · 7 comments
Assignees
Labels

Comments

@lgLindstrom
Copy link

I have a really simple example of a command line application that I can't get to work.

`public class CommandLine {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    String input = "";
    Scanner scanInput = new Scanner(System.in);
    boolean running = true;
   while (running)
   {
       System.out.println("Give data");

       input =  scanInput.nextLine();

       System.out.println(input);
   }
    System.out.println("Closing");
}     

}`

When running this application from Intellij IDE remote on a Raspberry "scanInput.nextLine" seems not to work. "System.out.println" works nicely putting text to the console window,, but there it ends.
When I after receiving promt "Give data" inputs some texts it seems like the input goes to a the local windows shell instead of the application.

For me, mainly working with hardware development, the possibility to quickly write a simple application to test new hardware,, is very important.

Can anyone help me here, are I doing something wrong or is it not supposed to work ..?

//lg

@BartoszKaszewczuk
Copy link

+1
Plugin seems to be passing keyboard input to bash shell rather than Java application.
Is it support issue or a matter of configuration? @asebak could you comment on this?

@asebak
Copy link
Owner

asebak commented Nov 29, 2016

Yeah that's correct, this is a bug, I would need to check it out.

@asebak asebak added the bug label Nov 29, 2016
@BartoszKaszewczuk
Copy link

It looks like inputs are passed to shell of local machine (where intelliJ is running).

@BartoszKaszewczuk
Copy link

Running with Run as sudo checkbox ticked also produces error sudo: no tty present and no askpass program specified
I assume the two are tied together.

BTW: Platform is macOS but I believe the issue should be reproducible on Linux instances

@emilm
Copy link

emilm commented Feb 22, 2017

Any progress on this? :)

@asebak
Copy link
Owner

asebak commented Feb 24, 2017

@emilm No progress yet, been pretty busy. It would be great if you guys can contribute fixes for it.

@asebak asebak self-assigned this Oct 5, 2017
@jugendhacker
Copy link

I have the same error! @asebak when you say me where in the repo I can find it I would fix ist if I can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants