Giter Site home page Giter Site logo

oliver-loeffler / java-toolkit-for-windows Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 6.39 MB

Template to compile an Innosetup project wich provides some Java related tooling (JDKs, Eclipse, Git, Wixtoolset etc.). Download scripts included.

License: MIT License

Batchfile 15.79% Inno Setup 42.01% Java 35.21% Shell 7.00%
gradle java maven windows eclipse-ide git-scm wix wix-toolset graalvm openjfx

java-toolkit-for-windows's Introduction

Customized Installer for a Java Developers Setup on Windows 10

It can be quite time consuming to setup and prepare a new developer PC - especially in restricted environments. This experiment uses InnoSetup to create an installable bundle providing all necessary tooling:

  • The installation does not require elevated privileges, everything works per user.
  • Eclipse IDE for Java Developers (2022-03)
  • Adoptium / Temurin LTS JDKs: 11, 17
  • Most recent Adoptium / Temurin JDK: 18
  • Zulu8 JDK with JavaFX - sometimes one still needs Java8
  • GraalVM 22.1 Community Edition with Java 17 support
  • OpenJFX 18 together with SceneBuilder 18
  • Gradle.org Build Tool 7.4.2
  • Apache Maven 3.8.5 Build Tool
  • WIX Toolset 3.11.2 (is required by JPackage on Windows)
  • GIT-SCM 2.36.1 for Windows

All components are collected by a download script. Then, all packages are unzipped and arranged so, that InnoSetup can consume all packages. Gradle will by default use the provided Java 17 as runtime. At this point, Maven still looks for JAVA_HOME but configuring this is not mandatory. Gradle, Maven and Git Bash are configured with scrips inside scripts directory. These scripts are Java classes with main methods and these are called by InnoSetup.

On Windows Commandline and on Git-Bash for Windows, one can use the jdks command to list all JDKs which have been installed. By calling jdk8, jdk11,jdk17,jdk18 or graal17 one can switch between the various JDKs on command line and Git Bash.

The installation for all these components works without admin provileges, those are not needed. All files are installed in C:\Users\<username>\AppData\Local\Programs\java (which is %LOCALAPPDATA%\Programs\java).

Following files are modified during installation:

  • %USERPROFILE%\.gradle\gradle.properties
  • %USERPROFILE%\.bashrc
  • %LOCALAPPDATA%\Programs\java\gradle-7.4.2\bin\{gradle|gradle.bat}

Prepare the InnoSetup Build - collect all materials

  1. Clone the repository
> git clone https://github.com/Oliver-Loeffler/Java-Toolkit-for-Windows.git
  1. Download all components
> cd Java-Toolkit-for-Windows
Java-Toolkit-for-Windows> download-all

Curl is used to perform all necessary downloads. All files will be placed in downloads. The InnoSetup script then requires all files unzipped and placed in a specific folder structure.

  1. Unzip all components and create required folders
Java-Toolkit-for-Windows> unzip-all
  1. Open the file Java-Toolkit.iss using the InnoSetup 6.2.1 IDE and run the package compile.

After a successful package compile, there should be an installer Java-Development-Tools.exe (approx. 1.43 GiB) inside the build directory.

Installation Package

Helpful stuff

If you completed the InnoSetup packaging and also installed the full package on your system, you can test the installation success on Windows Commandline. The jdks command will provide an overview about what is available.

> jdks
===============================================
 Available JDKs:
===============================================
C:\Users\Username\AppData\Local\Programs\java\zulu8.62.0.19-ca-fx-jdk8.0.332-win_x64
C:\Users\Username\AppData\Local\Programs\java\jdk-11.0.15+10
C:\Users\Username\AppData\Local\Programs\java\jdk-17.0.3+7
C:\Users\Username\AppData\Local\Programs\java\jdk-18.0.1+10
C:\Users\Username\AppData\Local\Programs\java\graalvm-ce-java17-22.1.0
C:\Users\Username\AppData\Local\Programs\java\jdk-18.0.1+10 (current JDK)

Well, if JDK18 is not suitable anymore, by entering jdk8 one could activate the Zulu8 JDK.

>jdk8
===============================================
 Switched to JDK 1.8 (Zulu 8 with JavaFX)
===============================================
JAVA_HOME=C:\Users\Username\AppData\Local\Programs\java\zulu8.62.0.19-ca-fx-jdk8.0.332-win_x64
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Zulu 8.62.0.19-CA-win64) (build 1.8.0_332-b09)
OpenJDK 64-Bit Server VM (Zulu 8.62.0.19-CA-win64) (build 25.332-b09, mixed mode)

Installer Images

Welcome Dialog Component Selection Dialog Additional Tasks Dialog Ready To Install Dialog Setup Completed Dialog

Interesting notes

java-toolkit-for-windows's People

Contributors

oliver-loeffler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.