Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,18 @@ Last-Modified and last-check metadata.

## Tool installer

The static landing page (`web/index.html`) presents Unix and PowerShell tool
installation commands, the follow-up `jvm install` command, and discovery,
installation and execution examples. It uses a responsive layout with links to
the GitHub repository and documentation. Each command has a keyboard-accessible
copy button when JavaScript is enabled, with success feedback announced to
assistive technology. If clipboard access fails, the command is selected for
manual copying and the page reports the failure. Commands remain readable and
selectable without JavaScript. Styling and icons are self-contained with no
external runtime assets or dependencies. The local `web/duke-claw.png` artwork
appears above the main heading in the left column; the header uses a text-only
wordmark.

`web/install.sh` and `web/install.ps1` implement standalone user-wide tool
installation; public URLs require the maintainer publication sequence in
[RELEASING.md](RELEASING.md). They install no JDK, never select a default, never
Expand Down
Binary file added web/duke-claw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 191 additions & 13 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,194 @@
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>jvm — Java for your projects</title>
<main>
<h1>jvm</h1>
<p>A small tool to download and select Java Development Kits.</p>
<p>Install the tool on Unix:</p>
<pre>curl -fsSL https://getjvm.dev/install.sh | bash</pre>
<p>Or in Windows PowerShell:</p>
<pre>iex (irm 'https://getjvm.dev/install.ps1')</pre>
<p>Then open a fresh terminal and run <code>jvm install</code> to install Java.</p>
<p><a href="https://github.com/codejive/jvm#readme">Instructions, options and source</a></p>
</main>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Download and select Java Development Kits with jvm. A small command line tool for your projects, on Unix and Windows.">
<meta name="theme-color" content="#f6f7f2">
<title>jvm — Java for your projects</title>
<style>
:root { color-scheme: light; --paper: #f6f7f2; --ink: #202c25; --muted: #59665d; --green: #236344; --line: #d9dfd5; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -80px; padding: 12px; background: white; z-index: 2; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #328157; outline-offset: 5px; }
header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 25px; font-weight: 750; letter-spacing: -1px; text-decoration: none; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { font-size: 14px; font-weight: 600; text-decoration: none; }
nav a:hover, .text-link:hover { color: var(--green); text-decoration: underline; }
.github { display: inline-flex; align-items: center; gap: 9px; }
.hero { padding-block: 45px 65px; display: grid; grid-template-columns: 1fr 1fr; gap: 68px; align-items: center; }
.getting-started { min-width: 0; }
.hero-art { display: block; width: 180px; height: auto; margin: 0 0 28px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 24px; color: var(--green); font-size: 12px; font-weight: 750; letter-spacing: 1.7px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
h1 { margin: 0; font-size: clamp(46px, 5.5vw, 68px); line-height: 1.07; letter-spacing: -3.5px; font-weight: 650; }
h1 span { color: var(--green); }
.intro { max-width: 440px; margin: 25px 0 29px; font-size: 18px; line-height: 1.75; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; text-decoration: none; }
.details { margin: 30px 0 0; font-size: 12px; color: var(--muted); }
.details span { margin-inline: 9px; color: #a3afa2; }
.installer { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 45px -28px #29483255; overflow: hidden; }
.installer-heading { padding: 22px 25px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.installer-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.installer-heading span { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); }
.install-body { padding: 25px; }
.command-label { margin: 0 0 10px; font-size: 13px; font-weight: 650; }
.command-label small { font-size: 12px; font-weight: 400; color: var(--muted); }
.command-label:not(:first-child) { margin-top: 24px; }
.command { display: flex; align-items: center; gap: 10px; padding: 13px 12px 13px 16px; background: #eff3ec; border: 1px solid #dfe6da; border-radius: 8px; min-width: 0; }
pre { flex: 1; min-width: 0; margin: 0; overflow-x: auto; padding-block: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12px; line-height: 1.7; }
.copy { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; padding: 7px; border: 1px solid transparent; border-radius: 6px; color: #52634f; background: transparent; cursor: pointer; }
.copy:hover { background: white; border-color: #cad6c3; color: var(--green); }
.copy[data-copied] { color: var(--green); background: white; }
.copy .check-icon, .copy[data-copied] .copy-icon { display: none; }
.copy[data-copied] .check-icon { display: block; }
.next-step { padding: 19px 25px 24px; background: #fafbf8; border-top: 1px solid var(--line); }
.next-step p { margin: 0 0 12px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.next-step strong { color: var(--ink); font-weight: 600; }
.next-step .command { background: white; }
.workflow { padding-block: 40px 65px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-size: 25px; font-weight: 600; letter-spacing: -.8px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.example { min-width: 0; }
.number { color: #788571; font-family: ui-monospace, monospace; font-size: 12px; }
h3 { margin: 12px 0 8px; font-size: 16px; font-weight: 650; }
.example p { margin: 0 0 19px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.example .command { padding-left: 12px; background: transparent; }
footer { border-top: 1px solid var(--line); padding-block: 25px 32px; display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); }
footer p { margin: 0; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
#copy-status { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; padding: 12px 20px; border-radius: 8px; background: var(--ink); color: white; font-size: 13px; box-shadow: 0 4px 20px #0002; pointer-events: none; }
#copy-status:empty { display: none; }
@media (min-width: 1200px) { .hero { gap: 80px; } }
@media (max-width: 960px) { .hero { gap: 35px; } h1 { font-size: 52px; } .examples { gap: 18px; } }
@media (max-width: 760px) {
.wrap { width: min(540px, calc(100% - 40px)); }
header { min-height: 80px; }
nav { gap: 22px; }
.hero { grid-template-columns: 1fr; gap: 38px; padding-block: 50px; }
h1 { font-size: clamp(44px, 9vw, 58px); letter-spacing: -2.5px; }
.intro { margin-block: 20px; font-size: 17px; }
.details { margin-top: 23px; }
.section-heading { display: block; margin-bottom: 28px; }
.section-heading p { margin-top: 10px; line-height: 1.7; }
.examples { grid-template-columns: 1fr; gap: 28px; }
.example p { margin-bottom: 12px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow { padding-bottom: 40px; }
footer { flex-wrap: wrap; }
}
@media (max-width: 380px) { .install-body, .installer-heading, .next-step { padding-inline: 17px; } .github span { display: none; } }
</style>
</head>
<body>
<a class="skip" href="#main">Skip to content</a>
<svg class="symbols" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<symbol id="icon-copy" viewBox="0 0 24 24"><rect x="8" y="8" width="12" height="12" rx="2" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3" fill="none" stroke="currentColor" stroke-width="1.6"/></symbol>
<symbol id="icon-check" viewBox="0 0 24 24"><path d="m5 12 4 4L19 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="icon-arrow" viewBox="0 0 24 24"><path d="M4 12h16m-6-6 6 6-6 6" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="icon-github" viewBox="0 0 24 24"><path fill="currentColor" d="M12 .7a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2.23c-3.22.7-3.9-1.37-3.9-1.37-.52-1.33-1.28-1.68-1.28-1.68-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.57-.3-5.27-1.29-5.27-5.74 0-1.27.45-2.31 1.19-3.13-.12-.3-.52-1.48.11-3.08 0 0 .97-.31 3.16 1.18a10.97 10.97 0 0 1 5.76 0c2.19-1.49 3.15-1.18 3.15-1.18.63 1.6.23 2.78.12 3.08.74.82 1.18 1.86 1.18 3.13 0 4.46-2.7 5.44-5.28 5.73.41.36.78 1.06.78 2.14v3.25c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .7Z"/></symbol>
</svg>
<header class="wrap">
<a class="brand" href="./" aria-label="jvm home">jvm</a>
<nav aria-label="Main navigation">
<a href="https://github.com/codejive/jvm#readme">Docs</a>
<a class="github" href="https://github.com/codejive/jvm" aria-label="jvm on GitHub"><svg aria-hidden="true"><use href="#icon-github"/></svg><span>GitHub</span></a>
</nav>
</header>
<main id="main" class="wrap">
<section class="hero" aria-labelledby="hero-title">
<div>
<img class="hero-art" src="duke-claw.png" width="1254" height="1254" alt="A claw machine picking a Java Duke mascot from a pile of Dukes.">
<p class="eyebrow">A little tool for your JDKs</p>
<h1 id="hero-title">Your projects.<br>Your Java.<br><span>Just jvm.</span></h1>
<p class="intro">Download and select Java Development Kits with a small command line tool that stays out of your way.</p>
<a class="text-link" href="https://github.com/codejive/jvm#readme">Explore the documentation <svg aria-hidden="true"><use href="#icon-arrow"/></svg></a>
<p class="details">Open source <span aria-hidden="true">/</span> MIT licensed <span aria-hidden="true">/</span> Unix &amp; Windows</p>
</div>
<div class="getting-started">
<section class="installer" aria-labelledby="install-title">
<div class="installer-heading"><h2 id="install-title">Start here</h2><span>01 / Install the tool</span></div>
<div class="install-body">
<h3 class="command-label">Unix <small>— macOS &amp; Linux</small></h3>
<div class="command"><pre><code>curl -fsSL https://getjvm.dev/install.sh | bash</code></pre></div>
<h3 class="command-label">Windows <small>— PowerShell</small></h3>
<div class="command"><pre><code>iex (irm 'https://getjvm.dev/install.ps1')</code></pre></div>
</div>
<div class="next-step">
<p><strong>02 / Make yourself at home.</strong><br>Open a fresh terminal application, then install Java:</p>
<div class="command"><pre><code>jvm install</code></pre></div>
</div>
</section>
</div>
</section>
<section class="workflow" aria-labelledby="workflow-title">
<div class="section-heading"><h2 id="workflow-title">A few commands. Plenty of Java.</h2><p>Pick a version. Get back to building.</p></div>
<div class="examples">
<article class="example"><span class="number">01 / DISCOVER</span><h3>See what’s available</h3><p>Browse compatible JDKs for your machine.</p><div class="command"><pre><code>jvm available</code></pre></div></article>
<article class="example"><span class="number">02 / INSTALL</span><h3>Choose your Java</h3><p>Ask for a version and distribution by name.</p><div class="command"><pre><code>jvm install temurin-21</code></pre></div></article>
<article class="example"><span class="number">03 / RUN</span><h3>Run with the right JDK</h3><p>Use Java 21 for an individual command.</p><div class="command"><pre><code>jvm exec 21 java -version</code></pre></div></article>
</div>
</section>
</main>
<footer class="wrap"><p>Small tool. More room to build.</p><p><a href="https://github.com/codejive/jvm">Source on GitHub</a> &nbsp;·&nbsp; <a href="https://github.com/codejive/jvm/blob/main/LICENSE">MIT license</a></p></footer>
<div id="copy-status" role="status" aria-live="polite" aria-atomic="true"></div>
<script>
const status = document.getElementById('copy-status');
let statusTimer;

// Add controls only when JavaScript is available; commands stay selectable without it.
document.querySelectorAll('.command').forEach((container) => {
const code = container.querySelector('code');
const button = document.createElement('button');
const label = `Copy command: ${code.textContent}`;
button.type = 'button';
button.className = 'copy';
button.setAttribute('aria-label', label);
button.title = 'Copy command';
button.innerHTML = '<svg class="copy-icon" aria-hidden="true"><use href="#icon-copy"/></svg><svg class="check-icon" aria-hidden="true"><use href="#icon-check"/></svg>';
let resetTimer;

button.addEventListener('click', async () => {
clearTimeout(statusTimer);
clearTimeout(resetTimer);
delete button.dataset.copied;
status.textContent = '';
try {
await navigator.clipboard.writeText(code.textContent);
button.dataset.copied = 'true';
button.setAttribute('aria-label', 'Command copied');
button.title = 'Copied!';
status.textContent = 'Command copied to clipboard';
} catch {
// Leave the exact command selected for manual copying if access is denied.
const range = document.createRange();
range.selectNodeContents(code);
const selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
status.textContent = 'Could not copy automatically. Select the command and copy it manually.';
}
resetTimer = setTimeout(() => {
delete button.dataset.copied;
button.setAttribute('aria-label', label);
button.title = 'Copy command';
}, 2200);
statusTimer = setTimeout(() => { status.textContent = ''; }, 5000);
});
container.append(button);
});
</script>
</body>
</html>
Loading