Skip to content

bochkov/jini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JINI - simple jvm-starter

Jini is a simple executable for Windows that launches a JVM and starts your java app.

Compile

Requirements

# compile jni invocation library and app
make JNI="c:/soft/java-17/include"

Using

  1. Compile
  2. Rename jini.exe to preferred name
  3. Copy exe to target location
  4. In target location create folder lib and put classpath jars into it
  5. In folder lib create file package.json which describe your distro
  6. Launch exe

package.json example

{
  "main.class": "com.example.Application",
  "class.path": [
    "lib/example-1.0.jar",
    "lib/gson-2.13.0.jar",
    "lib/logback-classic-1.5.18.jar",
    "lib/logback-core-1.5.18.jar",
    "lib/slf4j-api-2.0.17.jar",
  ],
  "vm.args": [
    "-Xmx64m",
    "-XX:+UnlockExperimentalVMOptions",
    "-XX:+UseZGC"
  ],
  "args": [
    "-debug"
  ]
}

Resources

Resources of exe file can be created with rcedit

rcedit "cmake-build-release/jini.exe" \
    --set-file-version "1.0.0.1" \
    --set-product-version "1.0.0.1" \
    --set-version-string "Comments" "App Comment" \
    --set-version-string "FileDescription" "File Description" \
    --set-version-string "ProductName" "Product Name" \
    --set-version-string "LegalCopyright" "Legal Copyright" \
    --set-icon "icon.ico"

Gradle Plugin

  1. add plugin to build.gradle
plugins {
  id 'com.sb.jini' version '0.4'
}

repositories {
  maven {
    url = "https://maven.sergeybochkov.com/releases"
  }
}
  1. configure plugin
tasks.named('jini').configure {
    mainClassName = 'com.example.Application'
    exeFilename = 'application.exe'
    vmArgs = ['-Xmx64m']
    icon = "${projectDir}/src/main/resources/style/application.ico"
    fileVersion = "1.0.0.0"
    productVersion = "1.0.0.0"
    comments = "My Application"
    fileDescription = "My Application"
    productName = "My Application"
    copyright = "Company"
}
  1. run jini task

About

simple jvm starter for windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published