{
    "url": "https://delaparra-services.nl/manuals/java-installeren",
    "locale": "en",
    "title": "Installing Java · DeLaParra Services",
    "description": "Installing the Java JDK, testing your first programme and building projects with Maven or Gradle.",
    "alternates": {
        "en": "https://delaparra-services.nl/manuals/java-installeren",
        "nl": "https://delaparra-services.nl/nl/handleidingen/java-installeren"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/manuals/java-installeren.csv",
        "md": "https://delaparra-services.nl/manuals/java-installeren.md",
        "json": "https://delaparra-services.nl/manuals/java-installeren.json",
        "zip": "https://delaparra-services.nl/manuals/java-installeren.zip",
        "pdf": "https://delaparra-services.nl/manuals/java-installeren.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/manuals/java-installeren.csv",
            "encodingFormat": "text/csv",
            "name": "java-installeren.csv"
        },
        {
            "url": "https://delaparra-services.nl/manuals/java-installeren.json",
            "encodingFormat": "application/json",
            "name": "java-installeren.json"
        },
        {
            "url": "https://delaparra-services.nl/manuals/java-installeren.md",
            "encodingFormat": "text/markdown",
            "name": "java-installeren.md"
        },
        {
            "url": "https://delaparra-services.nl/manuals/java-installeren.pdf",
            "encodingFormat": "application/pdf",
            "name": "java-installeren.pdf"
        },
        {
            "url": "https://delaparra-services.nl/manuals/java-installeren.zip",
            "encodingFormat": "application/zip",
            "name": "java-installeren.zip"
        }
    ],
    "markdown": "Installing the Java JDK, testing your first programme and building projects with Maven or Gradle.\n\n## WHAT IT IS | The JDK.\n\nJava is one of the most widely used programming languages, particularly for business software and Android. To create Java programmes, you need the **JDK** (Java Development Kit). The JRE is only for running programmes; make sure you use the JDK.\n\nChoose an **LTS** version, such as Java 21 or 25. I’m using Temurin here: a free version from the Eclipse Foundation. You can also use Oracle’s version, but it has different licence terms for businesses.\n\n### 01 / Windows\n\nOpen PowerShell via the Start menu and run the following:\n\n```\nwinget install --id EclipseAdoptium.Temurin.21.JDK -e\n```\n\nClose PowerShell and open it again.\n\n### 02 / Linux\n\n**Ubuntu / Debian / Linux Mint**\n```\nsudo apt update\nsudo apt install openjdk-21-jdk\n```\n\n**Fedora**\n```\nsudo dnf install java-21-openjdk-devel\n```\n\n**Arch Linux**\n```\nsudo pacman -S jdk21-openjdk\n```\n\n### 03 / Checking\n\n```\njava -version\njavac -version\n```\n\nPlease note: there is one hyphen here for ‘version’, not two.\n\n## FIRST PROGRAMME | Testing whether it works.\n\n### 04 / Create a file\n\nCreate a file called `Hallo.java`` with the following content:\n\n```\npublic class Hallo {\n    public static void main(String[] args) {\n        System.out.println(\"Hallo!\");\n    }\n}\n```\n\n### 05 / Start it\n\n```\njava Hallo.java\n```\n\nCan you see ‘Hello!?’? Then Java is working.\n\n## PROJECTS | Maven and Gradle.\n\nLarger Java projects use Maven (`pom.xml` file) or Gradle (`build.gradle` file). These retrieve the packages and build the programme.\n\n### 06 / Maven project\n\nIs there a file called `mvnw` or `mvnw.cmd` in the project? Use that; then you won’t need to install Maven separately:\n\n**Windows**\n```\n.\\mvnw.cmd package\n```\n\n**Linux**\n```\n./mvnw package\n```\n\n### 07 / Gradle project\n\n**Windows**\n```\n.\\gradlew.bat build\n```\n\n**Linux**\n```\n./gradlew build\n```\n\n## WORKING WITH AI | Ask your assistant.\n\n### 08 / Multiple versions\n\nDoes a project require a different version of Java? You can install multiple JDKs side by side. Ask your AI assistant which version is currently active and how to switch between them.\n\n### 09 / A task for your AI assistant\n\n\"Check which version of Java this project requires and whether it is installed. Build the project using the Maven or Gradle wrapper and explain what goes wrong if the build fails.\"\n\n**Good to know**\nOnly download Java from adoptium.net, oracle.com or via your computer’s package manager. Websites offering ‘free Java’ with their own installation programme are often untrustworthy.\n\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "TechArticle",
                "@id": "https://delaparra-services.nl/manuals/java-installeren#article",
                "url": "https://delaparra-services.nl/manuals/java-installeren",
                "headline": "Installing Java",
                "description": "Installing the Java JDK, testing your first programme and building projects with Maven or Gradle.",
                "inLanguage": "en",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/manuals/java-installeren#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/manuals/java-installeren#dataset",
                "name": "Installing Java",
                "description": "Installing the Java JDK, testing your first programme and building projects with Maven or Gradle.",
                "url": "https://delaparra-services.nl/manuals/java-installeren",
                "identifier": "https://delaparra-services.nl/manuals/java-installeren#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/manuals/java-installeren#article"
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "DeLaParra Services",
                    "url": "https://delaparra-services.nl/"
                },
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/manuals#dataset",
                    "name": "Manuals for working on your own app",
                    "url": "https://delaparra-services.nl/manuals"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "java-installeren.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/manuals/java-installeren.csv",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "java-installeren.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/manuals/java-installeren.json",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "java-installeren.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/manuals/java-installeren.md",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "java-installeren.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/manuals/java-installeren.pdf",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "java-installeren.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/manuals/java-installeren.zip",
                        "inLanguage": "en"
                    }
                ]
            }
        ]
    }
}