apache / apache/netbeans

Scanner input not working in Java Platform Shell

Open
#3,804 0 comments 0 reactions 0 assignees View on GitHub
Java kind:bug
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 13

### What happened

Java platform shell (Jshell) on Netbeans 13 not responding when I use Scanner.

It's already mentioned in Jira: https://issues.apache.org/jira/browse/NETBEANS-3855
and also asked in Stackoverflow: https://stackoverflow.com/q/60146438/2147347

### How to reproduce

Open java platform shell: Tools -> Java Platform Shell

write a simple input command:
```
Scanner a=new Scanner(System.in);
a.nextInt();
```

### Did this work correctly in an earlier version?

No

### Operating System

Windows

### JDK

11.0.12

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

![Screenshot 2022-03-18 004839](https://user-images.githubusercontent.com/12784465/158864356-c5ecc27e-93c7-4c57-8715-40ab6007d309.png)

### Are you willing to submit a pull request?

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue from Tools -> Java Platform Shell on Windows with the Scanner and nextInt() snippet, then review the linked Jira issue NETBEANS-3855 for existing investigation. Done means Scanner input is accepted and nextInt() responds normally in the Java Platform Shell.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.