Java

Learn how to build and run Java applications on Codesphere.

December 14, 2023 1 Min Read
Java
Java

Codesphere

From everyone in the Codesphere Team:)

Table of Contents

Java is a programming language and computing platform used for creating and running applications.

Using Java in Codesphere

Java does not come pre-installed in Codesphere. You can however install & use Java with one of the following options.

Option 1: Use our java spring boot template

Option 2: Add a maven wrapper (run mvn -N wrapper:wrapper locally) to your repo and set the following steps in the CI pipelineCI pipeline setup

Step Command
Prepare - Install java nix-env -iA nixpkgs.jdk19 [set desired jdk version]
Prepare - mvn generate-sources JAVA_HOME="$(readlink -e $(type -p javac) | sed -e 's/ \/ bin \/ javac//g')" ./mvnw install generate-sources -DskipTests
Run - mvn spring-boot:run JAVA_HOME="$(readlink -e $(type -p javac) | sed -e 's/\/bin\/javac//g')" ./mvnw spring-boot:run

Other Java distribution i.e. Java Quarkus can be installed using the provided CLI installation for Linux: https://quarkus.io/get-started/

In case you have any issues Please fill out the contact form to set up a consultation with one of our solution engineers or head over to our Discord community to get help.

About the Author

Java

Codesphere

From everyone in the Codesphere Team:)

We are building the next generation of Cloud, combining Infrastructure and IDE in one place, enabling a seamless DevEx and eliminating the need for DevOps specialists.

More Posts

Deploying Landscapes on Codesphere

Deploying Landscapes on Codesphere

Learn how to deploy and run multiple services that can independently scale vertically and horizontally within a single workspace. Suitable for hosting entire application landscapes.

Monitoring & Alerting

Monitoring & Alerting

Learn how to access Codesphere's built in resource monitoring and check the uptime of your applications.

Path-Based Routing

Path-Based Routing

Learn how to connect multiple independent applications to a single domain by associating different paths with distinct workspaces