JDK-8199193 : jshell tool: Add support for preview features
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jshell
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-03-06
  • Updated: 2018-04-30
  • Resolved: 2018-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b11Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
CSR :  
Relates :  
Description
Add --enable-preview flag to the jshell tool.

Since jshell only works with the current JVM version and compiled code is immediately executed, passing the --release $N flag to jshell doesn't make sense.  This means that when --enable-preview is used on the jshell tool in JDK $N, it will send "--release $N --enable-preview" to javac and "--enable-preview" to the java launcher.