如何在命令行中包含vm参数?

时间:2015-04-18 20:24:41

标签: amazon-web-services command-line executable-jar emr jvm-arguments

我有一个可运行的jar,我想在AWS EMR上运行。我需要提供几个args和一个VM arg。我该怎么做?

java -jar myjar.jar arg1 arg2 arg3

我如何以及在何处加入vm参数?

我把它放在eclipse上的VM参数

-Dncsa.hdf.hdf5lib.H5.hdf5lib=/home/gbachani/HDFView-2.11/HDFView-2.11.0-Linux/HDF_Group/HDFView/2.11.0/lib/libjhdf5.so

如何为AWS EMR设置它?

1 个答案:

答案 0 :(得分:1)

是:

java [ options ] -jar file.jar [ arguments ]

(见http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html

所以在你的情况下:

java -Dncsa.hdf.hdf5lib.H5.hdf5lib=/home/gbachani/HDFView-2.11/HDFView-2.11.0-Linux/HDF_Group/HDFView/2.11.0/lib/libjhdf5.so -jar myjar.jar arg1 arg2 arg3
相关问题