私はWindows7とNetbeansプラットフォームのプログラムを使用しています。私はこの行を書きました:
Runtime.getRuntime().exec("cmd /c start make.bat");
バットを実行すると完全に機能しますが、Javaはこれを次のように呼び出します。
C:\Users\RB\Documents\NetBeansProjects\BinaryTree>dot -T png -o tree.png tree.dot 'dot' is not recognized as an internal or external command, operable program or batch file. C:\Users\RB\Documents\NetBeansProjects\BinaryTree>cmd Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
バスファイルの内容は次のとおりです。
dot -T png -o tree.png tree.dot