1
library(tabulizer)
f <- system.file("examples", "data.pdf", package = "tabulizer")
f1 <-  extract_tables(f,output = "data.frame")
f1[[1]]

Running the previous R command in a jupyter-notebook at VSCode outputs the error:

ERROR: Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.IllegalAccessException: class RJavaTools cannot access a member of class java.util.ArrayList$Itr (in module java.base) with modifiers "public" Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.IllegalAccessException: class RJavaTools cannot access a member of class java.util.ArrayList$Itr (in module java.base) with modifiers "public" Traceback:

  1. extract_tables(f, output = "data.frame")
  2. guessesIterator$hasNext()
  3. .jrcall(x, name, ...)
  4. .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, . .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, . "java/lang/Object"), .jnew("java/lang/String", method), . j_p, j_pc, use.true.class = TRUE, evalString = simplify, . evalArray = FALSE)
  5. .jcheck(silent = FALSE)

But not when running in the R console.

Thanks in advance.

*I am running Java 11 (I also tried the 17 version, but the problem remains)

Carl
  • 4,232
  • 2
  • 12
  • 24
  • Welp, you're a step ahead of me: I get the same error also in the console on my arm64 MBP running R 4.1.2, rJava 1.0-6, Java jdk-17.0.1.jdk, and tabulizer 0.2.2. – Frederick Solt Dec 11 '21 at 19:59
  • 1
    Okay, I got this figured out, at least on my machine. See here: https://stackoverflow.com/a/70381999/2620381 – Frederick Solt Dec 16 '21 at 15:56

0 Answers0