Java를 사용하여 R을 실행하려고합니다. 저는 Mac에 R을 설치했으며 터미널에서 충분히 사용했습니다. 터미널에서 Java를 통해 터미널에서 R을 실행 중입니다.
는, R, 하나 단순히 유형 "R"전을 시작합니다 :
Macintosh-11:Desktop myname$ R
R version 2.12.2 (2011-02-25)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
그래서,이 단자를 통해 자바를 통해 R을 실행 할 싶은 것이. 내가 컴파일하고 실행할 때 나는 R의 시작을 볼 수 없습니다
java javar
를 사용하여, 그러나
public class javar {
public static void main(String[] args) throws Exception {
Runtime.getRuntime().exec("R");
}
}
: 그래서, 나 자신에게 자바 클래스를 썼다. 프로그램 실행이 끝나면 터미널이 다른 명령을 사용할 준비가되었습니다.
어떻게하면 되겠습니까?
결국 인수를 사용하여 ? – Clint
R 대신 Rgui로 시도 했습니까? –
[Runtime.exec()가 실행되지 않을 때] (http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html) –