<i18n dev> RFR 9 7131356 : (props) "No Java runtime present, requesting install" when creating VM from JNI [macosx]

Brent Christian brent.christian at oracle.com
Mon Jun 20 22:44:32 UTC 2016


Alex - thanks for your response.  More below...

On 6/13/16 4:51 PM, Alex Strange wrote:
>> 2. In "setupMacOSXLocale" we simply drop the call to
>> "JRSSetDefaultLocalization" as it appears to be a NOP. According to
>> Apple, that API sets up native bundle locale, so that any access to
>> native Cocoa UI (like FileOpenChooser) uses localized strings.
>> Testing shows that this does not seem to work even in Apple's own
>> JDK (ie. JDK 6), so dropping the call to this SPI here does not
>> result in a regression.  An issue was filed to investigate further
>> (8024279, a dup of 8019464) which has since been closed as, "Not an
>> Issue".
>
> This was added a very long time ago so that 'java -jar x.jar' would
> show properly localized menus in the menubar, instead of English
> menus, on a non-English system. It might no longer be a problem.

OK, thanks.

'java -jar x.jar' behavior is unchanged with this patch.  (From the bug 
report, it hasn't worked since JDK 7).

>> 3. In "setOSNameAndVersion", re-implement JRSCopyOSVersion using
>> [NSProcessInfo operatingSystemVersion].  (Use of JRSCopyOSName was
>> already removed by 7178922).
>
> You shouldn't need to use objc_msgSend_stret here. If you're not
> getting a warning when you use @selector in the line above, you
> should just be able to call -operationgSystemVersion directly inside
> the if.
>
> If you are getting a warning, it'd be best to declare the selector
> yourself somewhere higher up:
>
> typedef struct {
>         NSInteger majorVersion;
>         NSInteger minorVersion;
>         NSInteger patchVersion;
> } OSVerStruct;
>
> @interface NSProcessInfo ()
> - (OSVerStruct)operatingSystemVersion;
> @end

Thanks - this works for building w/ the 10.9 SDK (the officially 
supported Mac SDK for building JDK).

But I believe people also build w/ the 10.10 SDK (I've not tried it 
myself).  Won't this cause problems, since NSProcessInfo already has 
"operatingSystemVersion", and it returns an NSOperatingSystemVersion, 
not an OSVerStruct ?

I'd prefer something that can build on SDK 10.9 and 10.10, etc.  Once 
the official build moves to 10.10/later, objc_msgSend() can be removed 
and we can use [NSProcessInfo operatingSystemVersion] directly.

Thanks,
-Brent


More information about the i18n-dev mailing list