From a13fcc598e98cb4677406611a87c6a5befc6ec81 Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Wed, 7 Aug 2024 10:28:51 +0300 Subject: [PATCH] Refactored classpath --- R/r2pmml.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/r2pmml.R b/R/r2pmml.R index 37aa4df..c8e0d94 100644 --- a/R/r2pmml.R +++ b/R/r2pmml.R @@ -50,7 +50,11 @@ r2pmml = function(x, file, converter = NULL, converter_classpath = NULL, verbose java_dir = file.path(pkg.r2pmml, "java") - jar_files = list.files(path = java_dir, pattern = "*.jar", full.names = TRUE) + jar_files = readLines(file.path(java_dir, "classpath.txt"), encoding = "UTF-8", warn = FALSE) + + jar_files = sapply(jar_files, function(x){ + return(file.path(java_dir, x)) + }) return(paste(jar_files, collapse = .Platform$path.sep)) }