< prev index next >
src/java.base/macosx/native/libjava/java_props_macosx.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 33,49 ****
#include <SystemConfiguration/SystemConfiguration.h>
#include <Foundation/Foundation.h>
#include "java_props_macosx.h"
-
// need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded
static void *getJRSFramework() {
static void *jrsFwk = NULL;
if (jrsFwk == NULL) {
jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL);
}
return jrsFwk;
}
char *getPosixLocale(int cat) {
char *lc = setlocale(cat, NULL);
--- 33,51 ----
#include <SystemConfiguration/SystemConfiguration.h>
#include <Foundation/Foundation.h>
#include "java_props_macosx.h"
// need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded
static void *getJRSFramework() {
static void *jrsFwk = NULL;
+ #ifndef STATIC_BUILD
+ // JavaRuntimeSupport doesn't support static Java runtimes
if (jrsFwk == NULL) {
jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL);
}
+ #endif
return jrsFwk;
}
char *getPosixLocale(int cat) {
char *lc = setlocale(cat, NULL);
< prev index next >