Code Monkey home page Code Monkey logo

runner's Introduction

Runner

Small C# executable to run a Java JAR file using Open JDK

Runner is a small C# executable which starts the JAR using Open JDK but the executable uses its name to execute the jar in the same directory.

For example;

  1. If you start Runner.exe it will launch Runner.jar in the same directory
  2. If you rename Runner.exe to bob.exe it will launch bob.jar (assuming bob.jar exists)

This way you can have one executable that you can rename to target multiple JAR files.

The arguments passed are;

RuntimeFolder\bin\javaw.exe --module-path RuntimeFolder\javafx\lib --add-modules javafx.controls,javafx.fxml -jar JarName

Where;

  • RuntimeFolder is the runtime folder in the same directory as the executable.
  • JarName is the executable file name with .exe rplaced with .jar

A pre-compiled exe is in the "out" folder.

If you want to build your own Runner or change the icon there is a Windows batch file to build the C# code for you (download the project).

IMPORTANT: One thing to note is that by default Open JDK isn't in the OS path so Runner looks for a folder called "runtime" in the same folder as Runner.exe and the JDK should be in the runtime folder. You can adjust this in the C# code if you want. The code looks for the runtime folder in the same folder, one folder up and also looks for a JDK in C:\Java.

runner's People

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.