How to run command line Linux via Java in RapidMiner Studio?

LinuxLinux Member Posts: 1 Contributor I
edited July 2019 in Help

Dear Rapidminer,
I use RapidMiner Studio.
I want to create my own process and execute it via Java, then execute command line in Linux
    Process process = Runtime.getRuntime().exec(new String[] { "sh", "-c", command });

My environment:

    RAPIDMINER_HOME = /../myHome/rapidminer-studio
    JAVA_HOME = /../myHome/Project/jdk1.8.0_144/bin file with contain : version=1.0.0
I use Rapidminer 7.7-NAPSHOT -> it's working
but I use Rapidminer 7.6 (NON NAPSHOT), I have get error message :

Message: access denied ("" "<<ALL FILES>>" "execute")
Stack trace:

I try to :
+ Set RAPIDMINER_HOME = /../myHome/rapidminer-studio       -> fail
   or RAPIDMINER_HOME = /../myHome/rapidminer-studio/lib   -> fail

+ Java
    JAVA_HOME = /../myHome/Project/jdk1.8.0_144/bin       -> fail
     or JAVA_HOME = /../myHome/Project/jdk1.8.0_144/jre/bin   -> fail
       => I fail both of my way

+ Set value in file
   version=1.0.0-SNAPSHOT  -> fail
or version=1.0.0           -> fail

+ Rapidminer
I found the link with Question 5 "I want to create my own process and execute it via Java. What is the best way to do this?"

    RapidMiner.init(); --> Get error message

    RepositoryLocation pLoc = new RepositoryLocation("//Local Repository/folder/as/needed/yourProcessName"); -> How to find 'yourProcessName' ?
    ProcessEntry pEntry = (ProcessEntry) pLoc.locateEntry();
    String processXML = pEntry.retrieveXML();

Message: access denied ("java.util.PropertyPermission" "https.proxyHost" "write")

Please help me, I want to run my command in Linux via Java.
    Process process = Runtime.getRuntime().exec(new String[] { "sh", "-c", command });

Sign In or Register to comment.