Hi There,
I’m trying to compile a .java file using a command that I’ve added to the textpad tools and i’m getting this error:
“The input line is too long.
Tool completed with exit code 1”
Below are my settings ==============================================
My Command = cmd.exe
My Parameters = javac -deprecation -sourcepath %SOURCEPATH% -classpath %JARFILES%;.;%CLASSPATH% $File “j:\pmponline\pmp source\source\jumpapa.java” “j:\pmponline\pmp source\source\newapa.java” “j:\pmponline\pmp source\source\viewapa.java” “j:\pmponline\pmp source\source\openapa.java” “j:\pmponline\pmp source\source\stringformat.java” “j:\pmponline\pmp source\source\beans\resdefault.java” “j:\pmponline\pmp source\source\beans\persq.java” “j:\pmponline\pmp source\source\beans\comp.java” “j:\pmponline\pmp source\source\action.java” “j:\pmponline\pmp source\source\beans\resmes.java” “j:\pmponline\pmp source\source\beans\info.java” “j:\pmponline\pmp source\source\beans\misc.java” “j:\pmponline\pmp source\source\beans\apabean.java” “j:\pmponline\pmp source\source\beans\compreview.java” “j:\pmponline\pmp source\source\beans\expectreview.java” “j:\pmponline\pmp source\source\userbean.java” “j:\pmponline\pmp source\source\cancelapa.java” “j:\pmponline\pmp source\source\saveapa.java” “j:\pmponline\pmp source\source\repservlet.java” “j:\pmponline\pmp source\source\jumprep.java” “j:\pmponline\pmp source\source\beans\mycireport.java” “j:\pmponline\pmp source\source\beans\cpfreport.java” “j:\pmponline\pmp source\source\beans\fbtreport.java” “j:\pmponline\pmp source\source\beans\ppareport.java” “j:\pmponline\pmp source\source\beans\staffexp.java” “j:\pmponline\pmp source\source\beans\projectexp.java” “j:\pmponline\pmp source\source\beans\ppabean.java” “j:\pmponline\pmp source\source\beans\icssreport.java” “j:\pmponline\pmp source\source\beans\projectbean.java” “j:\pmponline\pmp source\source\beans\ebuser.java” “j:\pmponline\pmp source\source\beans\idvexp.java” “j:\pmponline\pmp source\source\reportsaction.java” “j:\pmponline\pmp source\source\menuservlet.java” “j:\pmponline\pmp source\source\beans\reportsview.java” “j:\pmponline\pmp source\source\menudb.java” “j:\pmponline\pmp source\source\beans\formsummaryview.java”
My Initial Folder = $FileDir
No Regular expression to match output and Registers are all blank.
==============================================
I know that the reason for the error is because my parameters list is too long, but is there a better way of doing this? If there is, please let me know how and where I can get info about it.
Thank you very much. I appreciate it.
Josh Gerszewski
Error when compiling
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
RE: Error when compiling
I tried adding an Environment Variable with the .java files in the value field and then just put the Environment Variable in the Textpad parameter field. It did the same thing. If anyone else has a better idea, please let me know.
Thanks!
Josh Gerszewski
Thanks!
Josh Gerszewski
What's the point of this?
I'm not exactly sure why you'd need to include this many parameters, and you've not explained why you need them. I can only guess that you're trying to replicate the "Compile All" functionality. If you want to do that, you can try, first of all, to substitute "*.java" for all directories, so that you'd have parameters like:
My Parameters = javac -deprecation -classpath %JARFILES%;.;%CLASSPATH%
“j:\pmponline\pmp source\source\*.java”
“j:\pmponline\pmp source\source\beans\*.java”
This way, you just compile everything matching *.java in the \source\ and \source\beans\ directories. If you've source files in other directories, include those as well. Incidentally, if you're compiling a file that's already IN either of those directories, you needn't include the $File parameter, and in this example the -sourcepath parameter is unecessary since you're explicitly declaring your files.
If you _do_ include sourcepath, and %SOURCEPATH% includes both those directories, you only need to use "*.java," without all the path information.
My Parameters = javac -deprecation -classpath %JARFILES%;.;%CLASSPATH%
“j:\pmponline\pmp source\source\*.java”
“j:\pmponline\pmp source\source\beans\*.java”
This way, you just compile everything matching *.java in the \source\ and \source\beans\ directories. If you've source files in other directories, include those as well. Incidentally, if you're compiling a file that's already IN either of those directories, you needn't include the $File parameter, and in this example the -sourcepath parameter is unecessary since you're explicitly declaring your files.
If you _do_ include sourcepath, and %SOURCEPATH% includes both those directories, you only need to use "*.java," without all the path information.