×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Gerrit Viljoen
Added: Aug 15, 2014 7:06 AM
Views: 33
Wrapper scripts for running a java CLI appy. Bash and Batch respectively.

Windows:
- Add install/bin directory to PATH variable.

Linux:
- chmod script to be executable.
- Create soft link to /usr/local/bin.
  1. #!/bin/bash
  2.  
  3. INSTALL='/opt/app'
  4.  
  5. IFS='%'
  6. java -cp $INSTALL:$INSTALL/lib/* com.app.Main $@
  7. unset IFS
  8.  
  9. ======================================
  10.  
  11. @echo off
  12.  
  13. set INSTALL="C:\Program Files (x86)\app"
  14.  
  15. java -cp %INSTALL%;%INSTALL%\lib\* com.app.Main %*
  16.