Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8209791

OpenJFX build fails in PrismPrint.c due to missing JNICALL

XMLWordPrintable

    • x86_64
    • windows_10

        A DESCRIPTION OF THE PROBLEM :
        The definition of getAlwaysOnTop in PrismPrint.c is missing JNICALL that is present in the declaration. This causes build error C2373 on recent versions of Visual Studio.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Build with MSVC 2017

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Successful compilation
        ACTUAL -
        Build fails with the following error:
        modules\javafx.graphics\src\main\native-prism\PrismPrint.c(35): error C2373: 'Java_com_sun_prism_j2d_print_J2DPrinterJob_getAlwaysOnTop': redefinition; different type modifiers
        modules\javafx.graphics\build\gensrc\headers\javafx.graphics\com_sun_prism_j2d_print_J2DPrinterJob.h(15): note: see declaration of 'Java_com_sun_prism_j2d_print_J2DPrinterJob_getAlwaysOnTop'

        CUSTOMER SUBMITTED WORKAROUND :
        Replace the line "JNIEXPORT jobject" with "JNIEXPORT jobject JNICALL" in PrismPrint.c

        FREQUENCY : always


              pmangal Priyanka Mangal (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: