我试图用MPJ Express做点什么(我的家庭作业(而且我找不到如何将 -np 参数传递给 MPJRun。
group 'ST1'
version '1.0-SNAPSHOT'
apply plugin: 'application'
mainClassName = 'example.Main'
sourceCompatibility = 1.8
def mpjHome = System.getenv( 'MPJ_HOME')
def mpjStarter = files("$mpjHome/lib/starter.jar")
def mpjJar = files("$mpjHome/lib/mpj.jar ")
def mpjClasspath = sourceSets.main.runtimeClasspath - mpjJar
dependencies {
compile mpjJar
}
run{
main = 'runtime.starter.MPJRun'
classpath = mpjStarter
args '-np 2' ,mainClassName, '-cp' , mpjClasspath.asPath
dependsOn classes
}
您的args
行应如下所示: args '-np', 2 ,mainClassName, '-cp' , mpjClasspath.asPath
在 Gradle 中显示配置的电影:https://www.youtube.com/watch?v=gj-3Td6ZOyc&t=942s