src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp
author sveerabhadra
Tue, 12 Dec 2017 12:31:49 +0530
changeset 48287 e53948132278
parent 47216 71c04702a3d5
child 49303 440ba068d981
permissions -rw-r--r--
8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac Reviewed-by: serb, prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
     2
 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1954
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1954
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1954
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1954
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1954
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
23621
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    26
#include "jni_util.h"
1954
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
    27
#include "awt.h"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#include <jni.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include <shellapi.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#include <float.h>
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    31
#include <shlobj.h>
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    32
#include "awt_Toolkit.h"
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    33
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    34
#define BUFFER_LIMIT   MAX_PATH+1
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    35
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    36
#define NOTIFY_FOR_ALL_SESSIONS 1
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    37
#define NOTIFY_FOR_THIS_SESSION 0
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    38
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    39
typedef BOOL (WINAPI *WTSRegisterSessionNotification)(HWND,DWORD);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    40
static WTSRegisterSessionNotification fn_WTSRegisterSessionNotification;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    41
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    42
BOOL isSuddenTerminationEnabled = TRUE;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
extern "C" {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * Class:     sun_awt_windows_WDesktopPeer
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    50
 * Method:    init
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    51
 * Signature: ()V
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    52
 */
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    53
JNIEXPORT void JNICALL Java_sun_awt_windows_WDesktopPeer_init
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    54
  (JNIEnv *, jclass) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    55
    static HMODULE libWtsapi32 = NULL;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    56
    if (libWtsapi32 == NULL) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    57
        libWtsapi32 = JDK_LoadSystemLibrary("Wtsapi32.dll");
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    58
        if (libWtsapi32) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    59
            fn_WTSRegisterSessionNotification = (WTSRegisterSessionNotification)
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    60
                    GetProcAddress(libWtsapi32, "WTSRegisterSessionNotification");
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    61
            if (fn_WTSRegisterSessionNotification) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    62
                HWND hwnd = AwtToolkit::GetInstance().GetHWnd();
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    63
                //used for UserSessionListener
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    64
                fn_WTSRegisterSessionNotification(hwnd, NOTIFY_FOR_THIS_SESSION);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    65
            }
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    66
        }
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    67
    }
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    68
}
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    69
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    70
/*
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
    71
 * Class:     sun_awt_windows_WDesktopPeer
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * Method:    ShellExecute
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
JNIEXPORT jstring JNICALL Java_sun_awt_windows_WDesktopPeer_ShellExecute
16469
169f9bf9b5d6 6550588: java.awt.Desktop cannot open file with Windows UNC filename
alitvinov
parents: 7668
diff changeset
    76
  (JNIEnv *env, jclass cls, jstring fileOrUri_j, jstring verb_j)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
{
16469
169f9bf9b5d6 6550588: java.awt.Desktop cannot open file with Windows UNC filename
alitvinov
parents: 7668
diff changeset
    78
    LPCWSTR fileOrUri_c = JNU_GetStringPlatformChars(env, fileOrUri_j, JNI_FALSE);
23621
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    79
    CHECK_NULL_RETURN(fileOrUri_c, NULL);
1954
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
    80
    LPCWSTR verb_c = JNU_GetStringPlatformChars(env, verb_j, JNI_FALSE);
23621
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    81
    if (verb_c == NULL) {
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    82
        JNU_ReleaseStringPlatformChars(env, fileOrUri_j, fileOrUri_c);
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    83
        return NULL;
b253f11270a8 8035858: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_Desktop.cpp
azvegint
parents: 16469
diff changeset
    84
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    // 6457572: ShellExecute possibly changes FPU control word - saving it here
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    unsigned oldcontrol87 = _control87(0, 0);
16469
169f9bf9b5d6 6550588: java.awt.Desktop cannot open file with Windows UNC filename
alitvinov
parents: 7668
diff changeset
    88
    HINSTANCE retval = ::ShellExecute(NULL, verb_c, fileOrUri_c, NULL, NULL, SW_SHOWNORMAL);
29005
7d7a78defc8f 8064934: Incorrect Exception message from java.awt.Desktop.open()
dmarkov
parents: 26751
diff changeset
    89
    DWORD error = ::GetLastError();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    _control87(oldcontrol87, 0xffffffff);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
16469
169f9bf9b5d6 6550588: java.awt.Desktop cannot open file with Windows UNC filename
alitvinov
parents: 7668
diff changeset
    92
    JNU_ReleaseStringPlatformChars(env, fileOrUri_j, fileOrUri_c);
1954
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
    93
    JNU_ReleaseStringPlatformChars(env, verb_j, verb_c);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    if ((int)retval <= 32) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        // ShellExecute failed.
1954
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
    97
        LPTSTR buffer = NULL;
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
    98
        int len = ::FormatMessage(
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                    FORMAT_MESSAGE_ALLOCATE_BUFFER |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                    FORMAT_MESSAGE_FROM_SYSTEM  |
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                    FORMAT_MESSAGE_IGNORE_INSERTS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                    NULL,
29005
7d7a78defc8f 8064934: Incorrect Exception message from java.awt.Desktop.open()
dmarkov
parents: 26751
diff changeset
   103
                    error,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
1954
b93b85df3211 6585765: RFE: Remove Unicows-related code from AWT
art
parents: 2
diff changeset
   105
                    (LPTSTR)&buffer,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                    0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                    NULL );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
6641
4a5fb08cce1c 6860270: JVM crash is occuring when verifying whether Browse action is supported on WinVista 64 bit
art
parents: 5506
diff changeset
   109
        if (buffer) {
4a5fb08cce1c 6860270: JVM crash is occuring when verifying whether Browse action is supported on WinVista 64 bit
art
parents: 5506
diff changeset
   110
            jstring errmsg = JNU_NewStringPlatform(env, buffer);
4a5fb08cce1c 6860270: JVM crash is occuring when verifying whether Browse action is supported on WinVista 64 bit
art
parents: 5506
diff changeset
   111
            LocalFree(buffer);
4a5fb08cce1c 6860270: JVM crash is occuring when verifying whether Browse action is supported on WinVista 64 bit
art
parents: 5506
diff changeset
   112
            return errmsg;
4a5fb08cce1c 6860270: JVM crash is occuring when verifying whether Browse action is supported on WinVista 64 bit
art
parents: 5506
diff changeset
   113
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    return NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   119
/*
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   120
 * Class:     sun_awt_windows_WDesktopPeer
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   121
 * Method:    moveToTrash
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   122
 * Signature: (Ljava/lang/String;)Z
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   123
 */
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   124
JNIEXPORT jboolean JNICALL Java_sun_awt_windows_WDesktopPeer_moveToTrash
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   125
  (JNIEnv *env, jclass, jstring jpath)
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   126
{
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   127
    LPCTSTR pathStr = JNU_GetStringPlatformChars(env, jpath, (jboolean *)NULL);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   128
    if (pathStr) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   129
        try {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   130
            LPTSTR fileBuffer = new TCHAR[BUFFER_LIMIT];
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   131
            memset(fileBuffer, 0, BUFFER_LIMIT * sizeof(TCHAR));
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   132
            // the fileBuffer is double null terminated string
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   133
            _tcsncpy(fileBuffer, pathStr, BUFFER_LIMIT - 2);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   134
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   135
            SHFILEOPSTRUCT fop;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   136
            memset(&fop, 0, sizeof(SHFILEOPSTRUCT));
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   137
            fop.hwnd = NULL;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   138
            fop.wFunc = FO_DELETE;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   139
            fop.pFrom = fileBuffer;
48287
e53948132278 8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac
sveerabhadra
parents: 47216
diff changeset
   140
            fop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI;
36903
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   141
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   142
            int res = SHFileOperation(&fop);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   143
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   144
            delete[] fileBuffer;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   145
            JNU_ReleaseStringPlatformChars(env, jpath, pathStr);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   146
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   147
            return !res ? JNI_TRUE : JNI_FALSE;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   148
        } catch (std::bad_alloc&) {
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   149
            JNU_ReleaseStringPlatformChars(env, jpath, pathStr);
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   150
        }
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   151
    }
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   152
    return JNI_FALSE;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   153
}
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   154
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   155
/*
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   156
 * Class:     sun_awt_windows_WDesktopPeer
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   157
 * Method:    setSuddenTerminationEnabled
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   158
 * Signature: (Z)V
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   159
 */
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   160
JNIEXPORT void JNICALL Java_sun_awt_windows_WDesktopPeer_setSuddenTerminationEnabled
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   161
  (JNIEnv *, jclass, jboolean enabled)
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   162
{
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   163
    isSuddenTerminationEnabled = enabled;
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   164
}
addc2e9d4bd4 8143227: Platform-Specific Desktop Features
azvegint
parents: 29005
diff changeset
   165
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
#ifdef __cplusplus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
#endif