RFR: JDK-8212780: JEP 343: Packaging Tool Implementation

Andy Herrick andy.herrick at oracle.com
Wed May 1 14:59:06 UTC 2019


I filed task JDK-8223187 
<https://bugs.openjdk.java.net/browse/JDK-8223187> to look into (1) and 
CR JDK-8223188 <https://bugs.openjdk.java.net/browse/JDK-8223188> to 
address (2).

/Andy


On 4/30/2019 6:53 PM, Phil Race wrote:
> A couple of questions / observations :-
> 1) setlocale
> http://cr.openjdk.java.net/~herrick/8212780/webrev.ea6/src/jdk.jpackage/linux/native/jpackageapplauncher/launcher.cpp.html
>
>    52 int main(int argc, char *argv[]) {
>    53     int result = 1;
>    54     setlocale(LC_ALL, "en_US.utf8");
>
> Why is this setlocale() call there ?
>
> What does this mean for a user whose desktop is (say) German, or French, or Japanese ?
>
> When the Java app is launched from this environment is it inheriting this US locale ? I hope not.
>
> We have the same on Mac :-
>
> http://cr.openjdk.java.net/~herrick/8212780/webrev.ea6/src/jdk.jpackage/macosx/native/jpackageapplauncher/main.m.html
>
> and windows :-
>
> http://cr.openjdk.java.net/~herrick/8212780/webrev.ea6/src/jdk.jpackage/windows/native/jpackageapplauncher/WinLauncher.cpp.html
>
>    64     ::setlocale(LC_ALL, "en_US.utf8");
>
>
> 2) C++ files containing C
>
> src/jdk.jpackage/windows/native/libjpackage/WindowsRegistry.cpp
>
>
>
> src/jdk.jpackage/windows/native/libjpackage/jpackage.cpp
>
>
>
> src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp
>
>
>
> have their entire contents wrapped in
>
>    36 #ifdef __cplusplus
>    37 extern "C" {
>    38 #endif
>
>   159 #ifdef __cplusplus
>   160 }
>   161 #endif
>
> wouldn't it be better to put them in .c files ?
>
>
> -phil.



More information about the core-libs-dev mailing list