Skip to main content

All Questions

Tagged with
1 vote
1 answer
96 views

Communicating Java and Python processes freeze after a while when using readline() but not input()

I have a Java program that needs to process a long series of input strings. To do this it goes through each string, passes it to a Process (a Python script), gets the result from the Process's ...
Zyxl's user avatar
  • 115
1 vote
1 answer
104 views

Exit inner loop only when EOF (Ctrl+D) is given via standard input

My program has a main while loop as the main logic, with an inner while loop for running the logic of the "command function". When inside the inner while loop, I want EOF (Ctrl + D) to exit ...
LHY's user avatar
  • 441
0 votes
2 answers
105 views

How can I read from stdin in a test with Maven?

I'd like to read from stdin as part of a test for my Java project, which uses Maven as its build tool. My Java code is something like this (simplified for demonstration purposes): try (Scanner stdin = ...
C0urante's user avatar
-3 votes
1 answer
78 views

this code prints nothing on intelliJ idea, it didn't even takes user input or anything

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); // Write your code here. ...
Aditya das's user avatar
1 vote
0 answers
53 views

Pipeing input to a Java process from Python - Java process does not receive input

I have a Java process that has the following logic: BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); while (true) { String line; LOGGER.info("...
user8845408's user avatar
0 votes
1 answer
153 views

Java Scanner and console input redirect

Stdin redirect breaks with simple Java (20.0.1) program using Scanner on Mac. Error: java.util.NoSuchElementException: No line found Broken.java import java.util.Scanner; class Broken { public ...
Siva's user avatar
  • 13
1 vote
2 answers
55 views

Java Stdin Cannot convert from String[] to String, but inputs are String?

I am doing a programming assignment that takes all of its input from stdin. The first input is an int n to tell you how many strings will follow, and the next n inputs are strings of varying lengths. ...
Gynzie's user avatar
  • 11
0 votes
0 answers
45 views

Java - Unicode input in cmd.exe doesn't match from other languages (like Node)

While reading input from the console via cmd.exe using Java, I noticed that if I input a string with Chinese characters (你好), it would always return a 65 (Char code for ?) in place of the character. ...
rfl890's user avatar
  • 92
1 vote
0 answers
46 views

Console input no longer being echo'd after changing stdout

In my program I have changed stdout using System.setOut(); but after that, typing into the console no longer echoes the input back. I tried the following, with no avail: originalStdIn = System.in; ...
vlOd's user avatar
  • 29
0 votes
1 answer
323 views

Is there a way to avoid the "hit enter key" when reading lines from stdin using BufferedReader?

The following is a simple but fully working Java program that demonstrates my issue: package bufferedreader_test; import java.io.BufferedReader; import java.io.IOException; import java.io....
WebViewer's user avatar
  • 851
0 votes
2 answers
361 views

Standard streams vs. non-standard streams

The so-called "standard streams" in Linux are stdin, stdout, and stderr. But they must be called "standard" for a reason. Are there non-standard streams? And are these non-standard ...
Md. Al-Amin Patwoary's user avatar
4 votes
2 answers
2k views

Stream image from Android with FFMPEG

I'm currently receiving images from an external source as byte array and I would like to send it as raw video format via ffmpeg to a stream URL, where I have a RTSP server that receives RTSP streams (...
xnok's user avatar
  • 319
0 votes
0 answers
48 views

My code detects Key Presses in Java but does detect when the key is lifted in StdDraw?

So my project requires me to only use StdIn, StdOut and StdDraw. I have got code to detect when certain keys are pressed but it doesn't stop moving until the boundary is hit. I need it to only move 1 ...
Jaya's user avatar
  • 1
0 votes
1 answer
566 views

Using a fifo as stdin to a process

How can I use a fifo to redirect stdin for a process? Using systemd, I am starting a service that will infrequently require commands to be sent via stdin. To overcome this, I have tried the following: ...
Matt Clark's user avatar
  • 28.4k
1 vote
1 answer
212 views

Eclipse: EOF not detected when CSV-parsing standard input

Use Eclipse (2021-06, 4.20.0) run-config settings in "Common" tab to attach a csv file to standard input. Attach a CSV parser to standard input. Pulling CSV records from the parser gets all ...
Underhill's user avatar
  • 422

15 30 50 per page
1
2 3 4 5
14