Renjin with eclipse (not maven)

Skip to first unread message

Jul 3, 2020, 8:37:19 AM7/3/20
to Renjin

Apologies if this has been covered elsewhere but I have searched the group and couldn't find anything. I am developing a project that requires part of my computation to be in R and another part in java. I downloaded all of the renjin jars and added them to my module path, and am trying to run a very simple example script but I have reached an error I cannot get past: 

Exception in thread "main" java.lang.NoClassDefFoundError: org/renjin/gcc/runtime/FunPtrDdIIII

I have never used Maven so am reluctant to start now, and do not have admin privileges on my laptop so cannot install anything at all. Can you help me get started? I was looking for a jar with dependencies but couldn't find one so instead I downloaded and linked all of the separate jars in my build path. I can confirm gcc-runtime-0.7.1515.jar is in my class path and module path. 

Best wishes,


Alexander Bertram

Jul 3, 2020, 8:44:31 AM7/3/20
to Renjin
Dear Steph,

The class that's missing (org/renjin/gcc/runtime/FunPtrDdIIII) is actually one that should have been generated on the fly by the build system when compiling R packages that have C code and use function pointers. This is a strategy we used long ago, before MethodHandle support came with Java 7. 

The generated function pointer wrappers were included with the compiled package jar, so i suspect you have some sort of version conflict. Can you double check that all of the jars from Renjin are from the same release?

Also, we do our best to ensure that new versions of Renjin continue to work with packages compiled with older versions of Renjin, but it's possible that is leading to a problem. If there's a specific version of package you need, you can find which version of Renjin was used to build it from, and try to use the same version of Renjin and see if the problem goes away.

If that doesn't work, try to post your full classpath to and share the link here, I can take another look.


Jul 6, 2020, 10:58:44 AM7/6/20
to Renjin
Dear Alexander,

Thank you for your fast response! 

I was able to get past my initial error by moving everything from the module path to the class path except , but now the error is:

Exception in thread "main" java.lang.RuntimeException: java.nio.file.InvalidPathException: Illegal char <<> at index 22: org\renjin\grDevices\[<-.raster.RData

Thanks again,


Bertram, Alexander

Jul 7, 2020, 4:10:20 AM7/7/20
Hmm, not sure about this. 

Many of the R functions indeed use symbols like "<-" and I haven't encountered a problem loading them before. I know some file systems like WIndows FAT32 can be more difficult about path names, but generally these resources are loaded from the JAR (.zip) files rather than from a file. You're not unpacking the jars are you?

You received this message because you are subscribed to the Google Groups "Renjin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Alexander Bertram
Technical Director
BeDataDriven BV

Tel. Nederlands: +31(0)647205388
Skype: akbertram

Jul 7, 2020, 6:05:16 AM7/7/20
to Renjin
It's worth adding that I am using what I think is an old version of renjin but I can't find the 3.5 jar anywhere!!!!


Jul 7, 2020, 6:05:20 AM7/7/20
to Renjin
I was unpacking the jars yes! I changed to importing the zip file ( and the module-info file can access renjin just fine but it doesn't seem to be able to find the packages (e.g. org.renjin.script) is this because I don't have the jar with dependencies? 

Sorry that I am finding this so difficult you have been beyond helpful! 

Best wishes,

To unsubscribe from this group and stop receiving emails from it, send an email to

Bertram, Alexander

Jul 7, 2020, 8:22:08 AM7/7/20
Looks like you're using Java 9? 

I know others had an issue crafting the right 

I'm afraid that we just haven't made the move yet to java 9, so i'm not yet knowledgeable enough to give you a 100% confident answer. I suspect it has something to do with reflection. See the follow result of uncritical googling:

Anyone else using Renjin with Java 9?


To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Per Nyfelt

Jul 7, 2020, 1:50:58 PM7/7/20
to Renjin
@Alex: I have not tried java 9 but it works fine in java 11.

@Steph: If you just want to run the script engine, you can make the list of jars much shorter: i.e.


With those dependencies, a simple test like this:

package se.alipsa;

import org.renjin.script.RenjinScriptEngine;
import org.renjin.script.RenjinScriptEngineFactory;
import org.renjin.sexp.SEXP;

import javax.script.ScriptException;

public class SimpleTest {

public static void main(String[] args) throws ScriptException {
RenjinScriptEngineFactory renjinScriptEngineFactory = new RenjinScriptEngineFactory();
RenjinScriptEngine engine = renjinScriptEngineFactory.getScriptEngine();

      SEXP result
= (SEXP)engine.eval("p <- 48; foo <- function(a, b) { return( a * b) }; bar <- foo(p, 2)");
System.out.println("Result is " + result.asInt());

using a primitive build script like this

#!/usr/bin/env bash

="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"



-g -cp "${libDir}/*" -d "${outDir}" -Xlint:unchecked $(find "${srcDir}"/* | grep .java)

echo "Running SimpleTest"
java -cp "${libDir}/*:${outDir}" se.alipsa.SimpleTest

yields the following output:

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
javac 11.0.7
Running SimpleTest
Result is 96

Reply all
Reply to author
0 new messages