diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f35dd60 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Tako Schotanus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 337e4c6..e22d895 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ Windows PowerShell 5.1. ## Using it in your projects Copy the three scripts `jvm`, `jvm.cmd` and `jvm.ps1` to the root of your -project, and tell your users they can run your application by simply typing: +project, keeping the embedded MIT license notices intact. You can keep your +project's own license. Tell your users they can run your application by simply +typing: ```sh ./jvm x 25+ your_app @@ -243,3 +245,10 @@ A command-line selector overrides the project file, which overrides the user file. Configuration does not affect `default`, `available`, `list`, `uninstall` or help. Run `jvm --help` for the full reference, and see [SPEC.md](SPEC.md) for the detailed behavior. + +## License + +[MIT](LICENSE). The runtime scripts and standalone installers include the full +license notice so it travels with copied files. Preserve these notices when +redistributing copies or substantial portions, including modified versions. +Downloaded JDKs remain subject to their respective licenses. diff --git a/SPEC.md b/SPEC.md index 45b93fd..914fdae 100644 --- a/SPEC.md +++ b/SPEC.md @@ -8,6 +8,14 @@ implementations: the Bash script `jvm` and the native Windows PowerShell 5.1 script `jvm.ps1`. Verification procedures and results live in [tests/README.md](tests/README.md). +## Licensing + +The project uses the MIT license in [LICENSE](LICENSE). The distributed runtime +scripts (`jvm`, `jvm.ps1`, `jvm.cmd`) and standalone installers +(`web/install.sh`, `web/install.ps1`) embed the full license notice so copies +can be redistributed with their required notices in the files themselves. +Downloaded JDKs retain their respective licenses. + ## Commands ```text diff --git a/jvm b/jvm index 3d44c27..11d1ba2 100755 --- a/jvm +++ b/jvm @@ -1,4 +1,26 @@ #!/usr/bin/env bash +# MIT License +# +# Copyright (c) 2026 Tako Schotanus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + DEFAULT_DISTRO=temurin DEFAULT_VERSION=25 diff --git a/jvm.cmd b/jvm.cmd index 817eec9..4c85052 100644 --- a/jvm.cmd +++ b/jvm.cmd @@ -1,3 +1,25 @@ @echo off +rem MIT License +rem +rem Copyright (c) 2026 Tako Schotanus +rem +rem Permission is hereby granted, free of charge, to any person obtaining a copy +rem of this software and associated documentation files (the "Software"), to deal +rem in the Software without restriction, including without limitation the rights +rem to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +rem copies of the Software, and to permit persons to whom the Software is +rem furnished to do so, subject to the following conditions: +rem +rem The above copyright notice and this permission notice shall be included in all +rem copies or substantial portions of the Software. +rem +rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +rem IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +rem FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +rem AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +rem LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +rem SOFTWARE. + powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0jvm.ps1" %* exit /b %ERRORLEVEL% diff --git a/jvm.ps1 b/jvm.ps1 index 9724811..884a6d1 100644 --- a/jvm.ps1 +++ b/jvm.ps1 @@ -1,3 +1,25 @@ +# MIT License +# +# Copyright (c) 2026 Tako Schotanus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + $ErrorActionPreference = 'Stop' $script:DefaultDistro = 'temurin' diff --git a/web/install.ps1 b/web/install.ps1 index b0963e1..063d141 100644 --- a/web/install.ps1 +++ b/web/install.ps1 @@ -1,3 +1,25 @@ +# MIT License +# +# Copyright (c) 2026 Tako Schotanus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + # Windows PowerShell 5.1 standalone bootstrap. No JDK commands are invoked. $ErrorActionPreference = 'Stop' diff --git a/web/install.sh b/web/install.sh index e812d13..721f3ca 100644 --- a/web/install.sh +++ b/web/install.sh @@ -1,4 +1,26 @@ #!/usr/bin/env bash +# MIT License +# +# Copyright (c) 2026 Tako Schotanus +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + # Standalone Bash bootstrap; persistent setup uses shell profiles on every host. set -eu VERSION='' PATH_CHOICE='' JAVA_CHOICE='' SHELL_CHOICE='' PROFILE='' NONINTERACTIVE=0