From 3a74bcf472b09d9af812b0b175b909a2b612be0e Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sat, 6 May 2023 17:12:05 +0900 Subject: [PATCH 01/11] Support conda and venv --- build.gradle | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index e1f54afea3..f7d9497e40 100644 --- a/build.gradle +++ b/build.gradle @@ -370,16 +370,25 @@ project(":grobid-service") { } workingDir = rootProject.rootDir def javaLibraryPath = "${System.getProperty('java.library.path')}:" + libraries -// if (System.env.CONDA_PREFIX) { -// def condaEnv = "${System.env.CONDA_PREFIX}/lib" -// def pythonDirectory = file(condaEnv).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() -// def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] -// -// javaLibraryPath = "${System.getProperty('java.library.path')}:" + -// libraries + ":" + -// "${System.env.CONDA_PREFIX}/lib:" + -// "${System.env.CONDA_PREFIX}/lib/python${pythonVersion}/site-packages/jep" -// } + def envPrefix = "" + if (System.env.CONDA_PREFIX) { + envPrefix = "${System.env.CONDA_PREFIX}" + } else if (System.env.VIRTUAL_ENV) { + envPrefix = "${System.env.VIRTUAL_ENV}" + } + + if (envPrefix) { + def envLibs = "${envPrefix}/lib" + def pythonDirectory = file(envLibs).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() + def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] + + javaLibraryPath = "${System.getProperty('java.library.path')}:" + + libraries + ":" + + "${envLibs}:" + + "${envLibs}/python${pythonVersion}/site-packages/jep" + } + + println(javaLibraryPath) systemProperty "java.library.path", javaLibraryPath } From 2a8e5a88061171712ca17439365cee2719b674de Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Mon, 8 May 2023 08:09:52 +0900 Subject: [PATCH 02/11] cleanup --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f7d9497e40..b529fbaaf3 100644 --- a/build.gradle +++ b/build.gradle @@ -388,7 +388,7 @@ project(":grobid-service") { "${envLibs}/python${pythonVersion}/site-packages/jep" } - println(javaLibraryPath) + println("Running with the java.library.path: ${javaLibraryPath}") systemProperty "java.library.path", javaLibraryPath } From 89a91a4bacdbbee0fca74c3d41627672a128b445 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Mon, 8 May 2023 15:16:56 +0900 Subject: [PATCH 03/11] fix librarypath, remove superfluous colon --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b529fbaaf3..36a23aa9ef 100644 --- a/build.gradle +++ b/build.gradle @@ -360,7 +360,7 @@ project(":grobid-service") { } } else if (Os.isFamily(Os.FAMILY_UNIX)) { libraries = "${file("../grobid-home/lib/lin-64/jep").absolutePath}:" + - "${file("../grobid-home/lib/lin-64").absolutePath}:" + "${file("../grobid-home/lib/lin-64").absolutePath}" } else { throw new RuntimeException("Unsupported platform!") } @@ -383,7 +383,7 @@ project(":grobid-service") { def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] javaLibraryPath = "${System.getProperty('java.library.path')}:" + - libraries + ":" + + libraries + "${envLibs}:" + "${envLibs}/python${pythonVersion}/site-packages/jep" } From 5ab4f91441f158304676eeb83ba04d5e74294358 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 09:44:11 +0200 Subject: [PATCH 04/11] update --- build.gradle | 94 +++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/build.gradle b/build.gradle index ba9dedcba6..f3b79a26f7 100644 --- a/build.gradle +++ b/build.gradle @@ -22,6 +22,47 @@ repositories { } } +def getJavaLibraryPath = { + def libraries = "" + if (Os.isFamily(Os.FAMILY_MAC)) { + if (Os.OS_ARCH.equals("aarch64")) { + libraries = "${file("./grobid-home/lib/mac_arm-64").absolutePath}" + } else { + libraries = "${file("./grobid-home/lib/mac-64").absolutePath}" + } + } else if (Os.isFamily(Os.FAMILY_UNIX)) { + def jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64/jep" + libraries = jepDir + jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64" + libraries += ":"+jepDir + } else { + throw new RuntimeException("Unsupported platform!") + } + def javaLibraryPath = "${System.getProperty('java.library.path')}:" + libraries + + def envPrefix = "" + if (System.env.CONDA_PREFIX) { + envPrefix = "${System.env.CONDA_PREFIX}" + } else if (System.env.VIRTUAL_ENV) { + envPrefix = "${System.env.VIRTUAL_ENV}" + } + + if (envPrefix) { + def envLibs = "${envPrefix}/lib" + def pythonDirectory = file(envLibs).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() + def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] + + javaLibraryPath = "${System.getProperty('java.library.path')}:" + + currentPath + + "${envLibs}:" + + "${envLibs}/python${pythonVersion}/site-packages/jep" + } + + println("Running with the java.library.path: ${javaLibraryPath}") + + return javaLibraryPath +} + apply plugin: 'jacoco' jacoco { @@ -190,21 +231,7 @@ subprojects { forkEvery = 1 maxHeapSize = "1024m" - def libraries = "" - if (Os.isFamily(Os.FAMILY_MAC)) { - if (Os.OS_ARCH.equals("aarch64")) { - libraries = "${file("./grobid-home/lib/mac_arm-64").absolutePath}" - } else { - libraries = "${file("./grobid-home/lib/mac-64").absolutePath}" - } - } else if (Os.isFamily(Os.FAMILY_UNIX)) { - def jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64/jep" - libraries = jepDir - jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64" - libraries += ":"+jepDir - } else { - throw new RuntimeException("Unsupported platform!") - } + def libraries = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs "--add-opens", "java.base/java.util.stream=ALL-UNNAMED", @@ -336,45 +363,14 @@ project(":grobid-service") { mainClassName = 'org.grobid.service.main.GrobidServiceApplication' tasks.run { - def libraries = "" - if (Os.isFamily(Os.FAMILY_MAC)) { - if (Os.OS_ARCH.equals("aarch64")) { - libraries = "${file("../grobid-home/lib/mac_arm-64").absolutePath}" - } else { - libraries = "${file("../grobid-home/lib/mac-64").absolutePath}" - } - } else if (Os.isFamily(Os.FAMILY_UNIX)) { - libraries = "${file("../grobid-home/lib/lin-64/jep").absolutePath}:" + - "${file("../grobid-home/lib/lin-64").absolutePath}" - } else { - throw new RuntimeException("Unsupported platform!") - } + def libraries = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED" } workingDir = rootProject.rootDir - def javaLibraryPath = "${System.getProperty('java.library.path')}:" + libraries - def envPrefix = "" - if (System.env.CONDA_PREFIX) { - envPrefix = "${System.env.CONDA_PREFIX}" - } else if (System.env.VIRTUAL_ENV) { - envPrefix = "${System.env.VIRTUAL_ENV}" - } - - if (envPrefix) { - def envLibs = "${envPrefix}/lib" - def pythonDirectory = file(envLibs).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() - def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] - - javaLibraryPath = "${System.getProperty('java.library.path')}:" + - libraries + - "${envLibs}:" + - "${envLibs}/python${pythonVersion}/site-packages/jep" - } - - println("Running with the java.library.path: ${javaLibraryPath}") - systemProperty "java.library.path", javaLibraryPath + + systemProperty "java.library.path", libraries } tasks.distZip.enabled = true From 08319b2d055e5916977ed4824a260985951df71d Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 09:48:05 +0200 Subject: [PATCH 05/11] fix missing var --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index f3b79a26f7..67b539c452 100644 --- a/build.gradle +++ b/build.gradle @@ -52,8 +52,7 @@ def getJavaLibraryPath = { def pythonDirectory = file(envLibs).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] - javaLibraryPath = "${System.getProperty('java.library.path')}:" + - currentPath + + javaLibraryPath = "${javaLibraryPath}:" + "${envLibs}:" + "${envLibs}/python${pythonVersion}/site-packages/jep" } From 4b7da7f52de1a65f84a0627c6222add7490eef05 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 16:53:49 +0200 Subject: [PATCH 06/11] fix print --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index 67b539c452..5e0cfdca8d 100644 --- a/build.gradle +++ b/build.gradle @@ -56,9 +56,6 @@ def getJavaLibraryPath = { "${envLibs}:" + "${envLibs}/python${pythonVersion}/site-packages/jep" } - - println("Running with the java.library.path: ${javaLibraryPath}") - return javaLibraryPath } From b97e70fc7e472fc252f5acfd2feba367e49828be Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 17:06:01 +0200 Subject: [PATCH 07/11] revise the gradle stuff --- build.gradle | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 5e0cfdca8d..43bc3ef1c7 100644 --- a/build.gradle +++ b/build.gradle @@ -23,22 +23,21 @@ repositories { } def getJavaLibraryPath = { - def libraries = "" + def jepLocalLibraries = "" if (Os.isFamily(Os.FAMILY_MAC)) { if (Os.OS_ARCH.equals("aarch64")) { - libraries = "${file("./grobid-home/lib/mac_arm-64").absolutePath}" + jepLocalLibraries = "${file("./grobid-home/lib/mac_arm-64").absolutePath}" } else { - libraries = "${file("./grobid-home/lib/mac-64").absolutePath}" + jepLocalLibraries = "${file("./grobid-home/lib/mac-64").absolutePath}" } } else if (Os.isFamily(Os.FAMILY_UNIX)) { - def jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64/jep" - libraries = jepDir - jepDir = rootProject.rootDir.getAbsolutePath() + "/grobid-home/lib/lin-64" - libraries += ":"+jepDir + jepLocalLibraries = "${rootProject.rootDir.getAbsolutePath()}/grobid-home/lib/lin-64/jep:" + + "${rootProject.rootDir.getAbsolutePath()}/grobid-home/lib/lin-64" } else { throw new RuntimeException("Unsupported platform!") } - def javaLibraryPath = "${System.getProperty('java.library.path')}:" + libraries + + def javaLibraryPath = "${System.getProperty('java.library.path')}:${jepLocalLibraries}" def envPrefix = "" if (System.env.CONDA_PREFIX) { @@ -52,9 +51,7 @@ def getJavaLibraryPath = { def pythonDirectory = file(envLibs).listFiles({ it.toString().contains("/lib/python") } as FileFilter)?.first() def pythonVersion = (pythonDirectory =~ /python([0-9]\.[0-9]+)/)[0][1] - javaLibraryPath = "${javaLibraryPath}:" + - "${envLibs}:" + - "${envLibs}/python${pythonVersion}/site-packages/jep" + javaLibraryPath += ":${envLibs}:${envLibs}/python${pythonVersion}/site-packages/jep" } return javaLibraryPath } @@ -227,13 +224,14 @@ subprojects { forkEvery = 1 maxHeapSize = "1024m" - def libraries = getJavaLibraryPath() + def javaLibraryPath = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs "--add-opens", "java.base/java.util.stream=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED", "--add-opens", "java.xml/jdk.xml.internal=ALL-UNNAMED" } - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + print(javaLibraryPath) + systemProperty "java.library.path", javaLibraryPath } } @@ -359,14 +357,14 @@ project(":grobid-service") { mainClassName = 'org.grobid.service.main.GrobidServiceApplication' tasks.run { - def libraries = getJavaLibraryPath() + def javaLibraryPath = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED" } workingDir = rootProject.rootDir - systemProperty "java.library.path", libraries + systemProperty "java.library.path", javaLibraryPath } tasks.distZip.enabled = true @@ -536,7 +534,7 @@ project(":grobid-trainer") { classpath = sourceSets.main.runtimeClasspath if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + systemProperty "java.library.path ${javaLibraryPath}" } } @@ -555,48 +553,52 @@ project(":grobid-trainer") { main = 'org.grobid.trainer.evaluation.EndToEndEvaluation' classpath = sourceSets.main.runtimeClasspath args 'nlm', getArg('p2t', '.'), getArg('run', '0'), getArg('fileRatio', '1.0') + def javaLibraryPath = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + systemProperty "java.library.path ${javaLibraryPath}" } task(teiEval, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { main = 'org.grobid.trainer.evaluation.EndToEndEvaluation' classpath = sourceSets.main.runtimeClasspath args 'tei', getArg('p2t', '.'), getArg('run', '0'), getArg('fileRatio', '1.0') + def javaLibraryPath = getJavaLibraryPath() if(JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + systemProperty "java.library.path ${javaLibraryPath}" } task(PrepareDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { main = 'org.grobid.trainer.evaluation.EvaluationDOIMatching' classpath = sourceSets.main.runtimeClasspath args 'data', getArg('p2t', '.') + def javaLibraryPath = getJavaLibraryPath() if(JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + systemProperty "java.library.path ${javaLibraryPath}" } task(EvaluateDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { main = 'org.grobid.trainer.evaluation.EvaluationDOIMatching' classpath = sourceSets.main.runtimeClasspath args 'eval', getArg('p2t', '.') + def javaLibraryPath = getJavaLibraryPath() if(JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path","${System.getProperty('java.library.path')}:" + libraries + systemProperty "java.library.path ${javaLibraryPath}" } } From ac19f8146f25f2c0824404261bbd173b155998f6 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 17:14:12 +0200 Subject: [PATCH 08/11] cleanup --- build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 43bc3ef1c7..3ef74394e3 100644 --- a/build.gradle +++ b/build.gradle @@ -230,7 +230,6 @@ subprojects { jvmArgs "--add-opens", "java.base/java.util.stream=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED", "--add-opens", "java.xml/jdk.xml.internal=ALL-UNNAMED" } - print(javaLibraryPath) systemProperty "java.library.path", javaLibraryPath } } @@ -532,9 +531,10 @@ project(":grobid-trainer") { tasks.create(name: taskName, type: JavaExec, group: 'modeltraining') { main = mainClassName classpath = sourceSets.main.runtimeClasspath + def javaLibraryPath = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" - systemProperty "java.library.path ${javaLibraryPath}" + systemProperty "java.library.path", javaLibraryPath } } @@ -559,7 +559,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path ${javaLibraryPath}" + systemProperty "java.library.path", javaLibraryPath } task(teiEval, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -572,7 +572,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path ${javaLibraryPath}" + systemProperty "java.library.path", javaLibraryPath } task(PrepareDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -585,7 +585,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path ${javaLibraryPath}" + systemProperty "java.library.path", javaLibraryPath } task(EvaluateDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -598,7 +598,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path ${javaLibraryPath}" + systemProperty "java.library.path", javaLibraryPath } } From a9425d2086e46cf53bb14471010167d38e41a939 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Sun, 8 Sep 2024 17:29:16 +0200 Subject: [PATCH 09/11] make it a string --- build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 3ef74394e3..aeceaae2ec 100644 --- a/build.gradle +++ b/build.gradle @@ -532,9 +532,10 @@ project(":grobid-trainer") { main = mainClassName classpath = sourceSets.main.runtimeClasspath def javaLibraryPath = getJavaLibraryPath() - if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) + if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" - systemProperty "java.library.path", javaLibraryPath + } + systemProperty "java.library.path", "${javaLibraryPath}" } } From fc769b6b6755a3341ee73bf259be7cc33472659c Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Mon, 9 Sep 2024 04:49:48 +0200 Subject: [PATCH 10/11] transform the java path var as string --- build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index aeceaae2ec..04f85e9002 100644 --- a/build.gradle +++ b/build.gradle @@ -230,7 +230,7 @@ subprojects { jvmArgs "--add-opens", "java.base/java.util.stream=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED", "--add-opens", "java.xml/jdk.xml.internal=ALL-UNNAMED" } - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } } @@ -363,7 +363,7 @@ project(":grobid-service") { } workingDir = rootProject.rootDir - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } tasks.distZip.enabled = true @@ -560,7 +560,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } task(teiEval, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -573,7 +573,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } task(PrepareDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -586,7 +586,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } task(EvaluateDOIMatching, dependsOn: 'classes', type: JavaExec, group: 'modelevaluation') { @@ -599,7 +599,7 @@ project(":grobid-trainer") { } else { jvmArgs '-Xmx3072m' } - systemProperty "java.library.path", javaLibraryPath + systemProperty "java.library.path", "${javaLibraryPath}" } } From 8a164018651b255cae755de3ca8a66314ff96ca3 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Fri, 29 Nov 2024 15:07:47 +0000 Subject: [PATCH 11/11] cosmetics in case of JVM 8 --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 0cee4a0a06..35f0f168d4 100644 --- a/build.gradle +++ b/build.gradle @@ -536,6 +536,8 @@ project(":grobid-trainer") { def javaLibraryPath = getJavaLibraryPath() if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) { jvmArgs '-Xmx3072m', "--add-opens", "java.base/java.lang=ALL-UNNAMED" + } else { + jvmArgs '-Xmx3072m' } systemProperty "java.library.path", "${javaLibraryPath}" }