Portable Java SDK Batch File


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ::-------------------::
  2. :: Philip Kavanagh ::
  3. :: C06412882 DT228/4 ::
  4. ::-------------------::
  5. @echo off
  6. cls
  7.  
  8. echo Running...
  9.  
  10. :: Create Directories
  11. echo "Status : |- |"
  12. echo -- Creating Directories
  13. mkdir src
  14. mkdir bin
  15. mkdir res
  16. mkdir docs
  17.  
  18. move *.java src
  19. ::set up something to move images, audio, folders etc
  20.  
  21. echo -- Compiling Source Code
  22.  
  23. :: Set Path
  24. cls
  25. echo "Status : |- |"
  26. set path=%path%;C:\Program Files\Java\jdk1.6.0_18\bin
  27.  
  28. :: Set Classpath
  29. set classpath=%classpath%;.
  30.  
  31. :: Compiler set up, now clean up directories
  32. cls
  33. echo "Status : |- |"
  34. cd bin
  35. rem *.class
  36.  
  37.  
  38. :: Compile source files
  39. cls
  40. echo "Status : |-- |"
  41. cd ..
  42. cd src
  43. javac *.java -d ../bin
  44.  
  45. ::Generate Javadocs
  46. cls
  47. echo "Status : |--- |"
  48. echo -- Generating Javadocs
  49. javadoc *.java -d ../docs
  50. cd ..
  51.  
  52. cls
  53. echo "Status : |----|"
  54.  
  55. ::Adding to JAR [NEEDS TO BE CHANGED]
  56. cd bin
  57. jar cf Program.jar *.class
  58. move *.jar ..
  59. cd ..
  60. echo Complete
  61. pause

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.