StatET in Eclipse and R - java

I've managed to install StatET into eclipse, and I have a Java project called "Test" with some code in there. I'd like to be able to keep a .R file in that project folder and run it as a stand alone R script, seperate from the Java program. How can I do this? If I try to highlight some R code in a .R file and run it, it says "No session of R is active in the current workbench window."
Update:
I added a run configuration and I now have the following error in a pop up box when I try to run the R script:
Launching the R Console was cancelled, because it seems starting the R engine failed.
Please make sure that R package 'rj' (1.0.0 or compatible) is installed and that the R library paths are set correctly for the R environment configuration 'R'

You need to first start an R console from within Eclipse. Select Run -> Run Configurations... from the menu bar. If you have not already created an R configuration, you can create a new one by right-clicking on R Console. For more information, Longhow Lam put together a nice guide (PDF).
EDIT:
Regarding your new error message, make sure rj is installed in R by running one of these commands in the command-line version of R. For the current StatET 2.0:
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.0")
For the development StatET 3.0:
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.1")
For the old StatET 0.10:
install.packages("rj", repos="http://download.walware.de/rj-0.5")
EDIT2
Its now
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.1")
Also see http://www.walware.de/it/downloads/rj.02.01.html

Just had same error message and finally found that it's due to the lack of privileges to write to the library directory under R. Therefore although Eclipse shows that RJ is installed, it's actually not.
re-installed RJ to a user directory and added the directory to the R console config, it worked.

For me I have to change in run/run configuration/launch type to put the value "Rterm" because it was to RJ by default and do the same config that jthetzel said in R-config -> configure -> add -> + -> try to find automaticly -> apply.

Related

When trying to build "./gradlew build" but it says build failed

I want to install COM port to connect my "Extended" controller (stabilization solution) but the software when plugged in, doesn't show any COM 3 ports. Found this solution https://github.com/NeuronRobotics/nrjavaserial
My steps: using the command git clone, after it is downloaded, I changed the directory to the folder it created.
$ cd nrjavaserial
After that, I tried to use this command.
$./gradlew build But it failed. Leaving this messagge in terminal :
What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache [in thread "Daemon worker"]
Any ideas? My guess is that java is not installed correctly or something is missing. Or support for this is not there.. Thank you in advance.
Using JAVA JDK jdk-18.0.2.1.jdk
M1 Macbook Air.

.jengine() not working in Java, but in R

I took over an old project from an other person. Currently I'm trying to get this project to work.
Already in the beginning I get an Exception in:
R.parseAndEval(".jengine()");
It throws a REngineEvalExcpetion: error during evaluation.
If I use R in the R-Console, I needed to add a parameter .jengine(start=TRUE) to get the command .jengine() working. So I changed this line in Java accordingly, but I still get the same Exception.
I did a tutorial with R without calling .jengine() and using Rengine instead of REngine and at least somehow it worked and I could call R commands within Java.
I'm currently using R 3.3.3 and Java 1.8. I also don't know which versions have been used previously.
"error during evaluation" just means that the R thread that is running the R script failed to run that command. But everything in the Java application is working properly. Is R that is failing.
R has to have the rJava library in order to run .jengine:
library(rJava)
.jinit(".")
.jengine(TRUE)

How to create Groovy class in Eclipse

My Computer is Macbook pro, the computer's system version is: OS X 10.11.4 (OS X El Capitan)
My Eclipse's version is 4.5.
the Eclipse is installed Groovy plugin (URL is http://dist.springsource.org/milestone/GRECLIPSE/e4.3/) ;
restart my Eclipse.
I create a Groovy project ----> success
I create a Groovy class ----> error !
have 2 alert .
the 1st :
‘Building workspace’ has encountered a problem . Errors occurred during the build .
error details : Errors occurred during the build.
Errors running builder 'Java Builder' on project 'GroovyJavaProject'.
org/codehaus/jdt/groovy/integration/LanguageSupportFactory
the 2nd :
Creation of element failed .
org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.codehaus.jdt.groovy.model.GroovyCompilationUnit.
Maybe the update site you have used is not the right one
From Groovy/Grails Tool Suite™ Downloads page the update link for Eclipse 4.5 is http://dist.springsource.com/release/TOOLS/update/e4.5/.
I believe the one you have used is for Eclipse 4.3.

Biginsights 3.0 silent installation using Chef

I am doing silent installation of Biginsights 3.0 using Chef. Strange thing is that if I invoke the installation without Chef recipe i.e manually "./silent-install.sh install.xml" it works fine. But when I invoke it through Chef recipe , it fails. It does not install bigsql1,sheets and due that it fails. I am pasting the error. It is not getting required files as bigsql1 installation is not completing successfully.
[ERROR] DeployManager - bigsql1 failed
com.ibm.xap.mgmt.ConfigurationException: initialize failed because /opt/ibm/biginsights/hdm/components/bigsql1/binary/bigsql1-dist.tar.gz is not found
at com.ibm.xap.mgmt.bigsql.BigSQL1Deployer.installInitialize(BigSQL1Deployer.java:73)
at com.ibm.xap.mgmt.DeployManager$InstallThread.doInstall(DeployManager.java:2760)
at com.ibm.xap.mgmt.DeployManager$InstallThread.work(DeployManager.java:2818)
at com.ibm.xap.mgmt.DeployManager$WorkerThread.run(DeployManager.java:2725)
Any help will be appreciated. I am sure somewhere Chef is failing to invoke bigsql1 install script and most probably it is terminal issue.
Here is my recipe code
bash "BI3.0" do
user "biadmin"
group "biadmin"
cwd "/home/biadmin/biginsights-3.0.0.1-SNAPSHOT-enterprise-production-Linux-amd64-b20140711_1047/silent-install"
code <<-EOH
sh silent-install.sh BI30.xml 2>&1 >> /tmp/console.out
EOH
end

Unable to start server in Eclipse Gallileo IDE with WAS7

Server not starting in Eclipse Gallileo IDE with WAS7.
I run the server from outside of Eclipse but I want to start it from within the eclipse
Below are the details of my Workspace configurations :
Eclipse Java EE IDE for Web Developers.
WAS 7.0
An alert is coming saying "Cannot connect to VM socket closed".
I got the following exception in console :
JVMSHRC154E Escape character g not valid for cache name
<JIT: FullSpeedDebug: ignoring countString>
<JIT: FullSpeedDebug: ignoring countString>
JVMJ9VM015W Initialization error for library j9shr24(13): JVMJ9VM009E J9VMDllMain failed
Per the JVMSHRC154E, it appears that somehow -Xshareclasses:name=...%g... is being added to your server JVM command line. I do not know why there would be a difference between Eclipse and the command-line (perhaps a product issue that should be reported to IBM), but you could try working around the issue by adding -Xshareclasses:nonfatal to your server's generic JVM arguments.
IBM has released development tools for WebSphere Application Server (WAS).
You can download it from eclipse market place.
There are tools for the WAS7 and up. (IBM Information page)
You probably need WAS 7 Tools - marketplace page.
The short instruction is:
In the eclipse click Help->Eclipse Market Place->Search WebSphere Application Server Tools.
Inside eclipse installation folder go to \plugins.....\cdcla\eclipse\launch\simple.
Open the file websphere70.properties.
You will see the following content and remove the
"_%g"
part and save it
shareclasses=webspherev70_%g,groupAccess,nonfatal

Categories

Resources