Skip to content

Instantly share code, notes, and snippets.

@johncf

johncf/run.bat Secret

Last active December 11, 2017 13:53
Show Gist options
  • Save johncf/a98cd3aa49491c5f58372566883e7810 to your computer and use it in GitHub Desktop.
Save johncf/a98cd3aa49491c5f58372566883e7810 to your computer and use it in GitHub Desktop.
Set correct PATH before launching server.exe (cx-Freeze build of https://github.com/johncf/java-play2)
@echo off
set path=%path%;%~dp0jdk\bin
start "" /d"%~dp0" "server.exe"
start http://localhost:8040/
@echo off
set DESKLINK=%USERPROFILE%\Desktop\Java Playground.lnk
IF EXIST "%DESKLINK%" DEL "%DESKLINK%"
@echo Creating a Desktop shortcut . . .
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%DESKLINK%');$s.TargetPath='%~pd0run.bat';$s.Save()"
@echo Done!
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment