home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / JAVA-Programming-Tools / JDEX.ZIP / jdex / Java Compile.bat < prev    next >
Encoding:
DOS Batch File  |  1998-04-29  |  943 b   |  37 lines

  1. ::
  2. ::    Part of JDEX - Java Development Environment using Explorer
  3. ::
  4. ::    Copyright (c) 1998, by J. Brian Coyle
  5. ::                           mailto:brianc@magicnet.net
  6. ::                           http://www.magicnet.net/~brianc
  7. ::
  8. ::    Refer to JDEX\copyright.txt for additional information.
  9. ::
  10. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  11. @echo off
  12. ::
  13. ::       Java Compile.bat                03/20/98
  14. ::      compiles a .java file 
  15. :: 
  16. if "%1"=="" goto usage
  17. if NOT EXIST "%1" goto usage
  18. lfnfor on
  19. for %%f in (%1*) do set filename=%%f
  20. echo compiling %1 (%filename%)
  21. javac -J-Djavac.pipe.output=true %filename% > %filename%.txt
  22. if errorlevel 1 goto error
  23. echo Compile completed OK.
  24. erase %filename%.txt 
  25. goto exit
  26.  
  27. :error
  28. echo Compile has errors!!!
  29. type %filename%.txt | more
  30. goto exit
  31.  
  32. :usage
  33. echo ERROR!  missing filename to compile
  34. echo Usage is-  %0 filename
  35. :exit
  36. pause
  37.