Quick Start — Java¶
Deploy a Java app (Spring Boot, Quarkus, Micronaut, plain JVM) from git push to a live HTTPS URL in 5 minutes.
Prerequisites¶
- A Java project with
pom.xml(Maven) orbuild.gradle(Gradle) - JDK 17+ on your machine (
java --version) - The
paasCLI:
Scaffold (if you don't have a project yet — Spring Boot)¶
curl -s https://start.spring.io/starter.tgz \
-d type=maven-project \
-d language=java \
-d bootVersion=3.2.5 \
-d baseDir=hello-paas \
-d name=hello-paas \
-d packageName=com.example.hellopaas \
-d dependencies=web \
| tar -xzvf -
cd hello-paas
cat > src/main/java/com/example/hellopaas/HelloController.java <<'EOF'
package com.example.hellopaas;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/")
public String home() {
return "Hello from PaaS Runtime!\n";
}
}
EOF
git init && git add -A && git commit -m "init"
Step 1 — Authenticate¶
Verify:
Step 2 — Create the app¶
Output:
✓ Created app hello-paas
URL: https://hello-paas.runtime.di2amp.com
Region: eu-fr-1
Plan: free
Git: https://git.di2amp.com/octave/hello-paas.git
Step 3 — Add a Procfile¶
Spring Boot reads SERVER_PORT (or PORT) automatically. The Paketo Java buildpack runs mvn clean package and produces a runnable jar:
Commit:
Step 4 — Push to deploy¶
Live build logs:
remote: ─────── PaaS Build ───────
remote: → Detected: java (paketo-buildpacks/java)
remote: → Installing Bellsoft Liberica JRE 17.0.10
remote: → Installing Maven 3.9.6
remote: → Running: mvn -B package -DskipTests
remote: → Image: registry.di2amp.com/octave/hello-paas:abc1234
remote: → Image size: 234 MB (JRE base + jar)
remote: → SBOM: ✓ generated, 92 packages
remote: → CVE scan: ✓ 0 critical, 0 high
remote:
remote: ─────── PaaS Deploy ───────
remote: → Process types: web
remote: → Replicas: 1/1 ready
remote: → Rollout: v1 → v2 (canary 10% → 100%)
remote: → Health: / returns 200 OK (waited 28s for JVM warmup)
remote: → URL: https://hello-paas.runtime.di2amp.com
remote:
remote: ✓ Deployed in 78s
JVM cold start adds 20–40s. The Paketo Memory Calculator auto-tunes -Xmx, -Xss, etc. based on container limits.
Step 5 — Verify the app is live¶
Dashboard runtime status:
https://ma30.di2amp.com/runtime/dashboard/apps/hello-paas
Next steps¶
Add a managed PostgreSQL¶
DATABASE_URL is injected. Spring Boot config (application.properties):
Tail logs¶
Tune JVM memory¶
The Paketo Java buildpack reads BPL_JVM_THREAD_COUNT and BPL_JVM_HEAD_ROOM:
Native image (GraalVM, faster cold start)¶
Switch to the GraalVM Paketo buildpack:
Build time goes up (5–10 min) but cold start drops to <100ms.