Best Java Launcher

From NSIS Wiki

Author: Sriharshach (talk, contrib)


About

This script will produce an EXE that can be prepended to a JAVA jar file to produce a self executable java application.

Usage

  1. Compile NSIS script
  2. Execute from the DOS / Command Prompt:
copy /b test.exe+myjar.jar output.exe

Script

;This is a very simple Java Launcher
;Author: Sri Harsha Chilakapati
 
  !include FileFunc.nsh
  Crccheck off
 
  ;icon icon.ico
  outfile test.exe
 
  silentinstall silent
 
  section '1'
  sectionend
 
  function .onInit
    ${GetExeName} $0
    ${GetParameters} $1
    execwait 'javaw.exe "$0" "$1"'
  functionend
 
;usage: copy /b test.exe+myjar.jar output.exe
Personal tools
donate