0
編輯:---- 我需要批量處理來自我的JavaFX應用程序的一些處理草圖文件。下面的代碼在Windows上工作。我想讓它在Mac上運行,但不知道如何。JavaFX。如何從終端OSX運行處理
我的工作流程如下:
//as the user for the processing-java.exe file
processingJavaProrgramFile = fileChooser.showOpenDialog(stage);
if (processingJavaProrgramFile != null) {
processingJavaProrgramPath = processingJavaProrgramFile.getPath();
}
//ask the user for the processing sketch folder
processingSketchDir = directoryChooser.showDialog(stage);
if (processingSketchDir != null) {
sketchPath = processingSketchDir.getPath();
}
//java run time exec method to compile sketch in user folder using through processing-java.exe
Runtime.getRuntime().exec(
processingJavaProrgramPath +
" --force --run --sketch=" +
sketchPath + " --output=" +
sketchPath+File.separator +
"temp"
);
我如何得到它在Mac上運行?首先,Mac版本沒有處理java.exe。它應該是一個不同的工作流程?如果是這樣,我該如何讓應用程序知道它是在Windows還是在Mac OS上運行,以便它運行適當的方法?
發佈[MCVE](http://stackoverflow.com/help/mcve)以及您看到的具體錯誤,我們將從此處繼續。 –