The command line is too long. Error: An error occurred while shelling out to javac (error code = 1). Unable to build executable.

8 ビュー (過去 30 日間)
Chaowei Chen
Chaowei Chen 2015 年 11 月 19 日
編集済み: Yuebin Zhou 2015 年 11 月 25 日
I am using mcc to build java classes from .m files The command is following:
mcc -W "java:matlabapi,DefaultClass" -T link:lib -d .\distr\ -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v -B MatlabClassList
where MatlabClassList is a file with content:
class{Imop_CameraSet_Delete:WaveKit\M_Files\Imop_CameraSet_Delete.m} class{Imop_CameraSet_GetAvailableValue:WaveKit\M_Files\Imop_CameraSet_GetAvailableValue.m} class{Imop_CameraSet_GetAvailableValuesListSize:WaveKit\M_Files\Imop_CameraSet_GetAvailableValuesListSize.m} class{Imop_CameraSet_GetParameterBooleanDefaultValue:WaveKit\M_Files\Imop_CameraSet_GetParameterBooleanDefaultValue.m} class{Imop_CameraSet_GetParameterIntDefaultValue:WaveKit\M_Files\Imop_CameraSet_GetParameterIntDefaultValue.m} class{Imop_CameraSet_GetParameterIntLimits:WaveKit\M_Files\Imop_CameraSet_GetParameterIntLimits.m}
it works if the list is small. However I have 392 classes to create. In this case, I got "The command line is too long. Error: An error occurred while shelling out to javac (error code = 1). Unable to build executable."

回答 (1 件)

Yuebin Zhou
Yuebin Zhou 2015 年 11 月 25 日
編集済み: Yuebin Zhou 2015 年 11 月 25 日
If you have large number of files to be compiled, the command executed on the Windows Command prompt will become too long. According to the external link. http://support.microsoft.com/kb/830473
there is a limit (8191) on the number of characters that can be executed on the command prompt.
The work around is to reduce the path of the java files by saving the files in a different path.

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by