Or terminal? (was Re: jshell depends on some windows registry?)

Weijun Wang weijun.wang at oracle.com
Wed May 4 05:59:14 UTC 2016


First, an quite important observation. The jshell tool works fine in a 
Windows Command Prompt window but not in a Cygwin terminal. Precisely:

1. Cygwin Terminal, i.e. its mintty terminal: Not working.

2. Windows cmd.exe under C:> prompt: Working.

3. Windows cmd.exe and then call c:\cygwin\cygwin.bat: Still working.

So maybe this is not a registry issue but a terminal one.

Replies to your questions inline below.

On 5/4/2016 12:48, Robert Field wrote:
> Hi Max,
>
> There is no concept of "installing" jshell beyond having JDK9 installed.

I meant installing the JDK, I heard it add some registry entries but not 
sure what they are.

>
> The jshell tool uses the Java Preferences API, which seems to be failing
> in this case -- the Preferences API uses platform specific functionality
> to save/restore preferences.
>
> I don't know the specifics of how it works on different platforms --
> anybody have an idea what is going on here?  We may need to file a
> Preferences bug.
>
> Just to be sure everything is lined up right, can you do:
>
>     java -fullversion

java full version "9-ea+116"

>
>     jshell -fullversion

May 04, 2016 1:44:11 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs 
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
jshell 9-ea+116

Thanks
Max

>
> Thanks,
> Robert
>
>
> On 05/03/2016 09:32 PM, Weijun Wang wrote:
>> I copied the images to my own computer (without running any installer)
>> and running jshell in jdk9/b116 shows this
>>
>>  $ jshell
>> May 04, 2016 12:30:25 PM java.util.prefs.WindowsPreferences <init>
>> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
>> at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
>> |  Welcome to JShell -- Version 9-ea
>> |  For an introduction type: /help intro
>>
>> jshell>
>>
>> Then if I enter anything, it just hangs forever.
>>
>> Must I install it? What if I am building my own jdk?
>>
>> Thanks
>> Max
>


More information about the kulla-dev mailing list