To run the code for your challenge locally, you’ll need java & mvn installed. Our test runners use Java 21 (as of November 2023).The script for your challenge (like ./your_bittorrent.sh) will automatically compile your code using mvn before executing it. It’ll
look something like this:
When running tests on our servers, the mvn command will only be run once and then commented out. This ensures that each test only runs the java -jar ... line.
You can add more files and directories to src/main/java. The test runner will include them when compiling your code.For example, if you added a file at src/main/java/Foo.java, you could use it like so:
public class Main { public static void main(String[] args) { Foo.foo(); // calls the method foo() from Foo class in Foo.java }}
public class Foo { public static void foo() { System.out.println("Hello world!"); }}
By default, all files in src/main/java are in the default package. If you want to extract files into a different package,
you’ll need to add a package declaration to the top of the file and change its location. Here’s what that’d look like:Let’s say you wanted to extract Foo.java into the com.example package. Store Foo.java at src/main/java/com/example/Foo.java and add the following lines:
package com.examplepublic class Foo { public static void foo() { System.out.println("Hello world!"); }}
import com.example.Foo;public class Main { public static void main(String[] args) { Foo.foo(); // Uses the foo function from Foo class in the com.example package }}
Use an IDE like IntelliJ IDEA which will automatically offer to move your file
to a directory matching the package name.
You can add dependencies to your project by adding them to your pom.xml file.For example, to add the gson library, add the following to the <dependencies> section in your pom.xml:
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"CodeCrafters","colors":{"primary":"#14B8A6","light":"#00EFD1","dark":"#0D9488"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/codecrafters/rBHxsHriiZT92xcM/logo/light.svg?fit=max\u0026auto=format\u0026n=rBHxsHriiZT92xcM\u0026q=85\u0026s=c25b07c68301871e1fb0d262abf5b3be","dark":"https://mintcdn.com/codecrafters/rBHxsHriiZT92xcM/logo/dark.svg?fit=max\u0026auto=format\u0026n=rBHxsHriiZT92xcM\u0026q=85\u0026s=dcabf5c8dbac81c59f7d6c740914b97f","href":"https://codecrafters.io"},"navbar":{"links":[{"label":"Login","href":"https://app.codecrafters.io/login"}],"primary":{"type":"button","label":"Try Now","href":"https://app.codecrafters.io/"}},"footer":{"socials":{"twitter":"https://twitter.com/codecraftersio","github":"https://github.com/codecrafters-io"}},"integrations":{"posthog":{"apiKey":"phc_jCl1mm3XbnvyIUr4h54oORqWEqj37gxhZIOebREBwxb"},"plausible":{"domain":"docs.codecrafters.io"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Forum","href":"https://forum.codecrafters.io/","icon":"discourse","color":{"light":"#5865F2","dark":"#5865F2"}},{"anchor":"Demo","href":"https://codecrafters.io/videos/demo","icon":"circle-play","color":{"light":"#00EFD1","dark":"#00EFD1"}}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"codecrafters","hasAudioNarration":false,"actualSubdomain":"codecrafters","customDomains":["docs.codecrafters.io"],"gitSource":{"type":"github","owner":"codecrafters-io","repo":"docs","deployBranch":"master","contentDirectory":"docs","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c3420e965794a0a73468","collectionId":"62739c3d-7f8e-4106-bc9d-338a8bc756d9","schemaVersion":"v2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a20c3420e965794a0a73468:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Documentation","count":39},{"language":"default","tag":"Contributor Guides","count":20},{"language":"default","tag":"Challenges","count":19},{"language":"default","tag":"Language Support","count":13},{"language":"default","tag":"Authoring Concepts","count":11},{"language":"default","tag":"Authoring Challenges","count":5},{"language":"default","tag":"Concepts Style Guide","count":5},{"language":"default","tag":"Membership Benefits","count":5},{"language":"default","tag":"CLI","count":4},{"language":"default","tag":"Adding Language Support","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"challenges/language-support/java","slug":"/challenges/language-support/java","pageMetadata":{"title":"Java","description":"Learn how to solve CodeCrafters challenges in Java","href":"/challenges/language-support/java","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to solve CodeCrafters challenges in Java\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`local-development`,children:`Local development`}),`\n`,_jsxs(_components.p,{children:[`To run the code for your challenge locally, you’ll need `,_jsx(_components.code,{children:`java`}),` \u0026 `,_jsx(_components.code,{children:`mvn`}),` installed. Our test runners use Java 21 (as of November 2023).`]}),`\n`,_jsxs(_components.p,{children:[`The script for your challenge (like `,_jsx(_components.code,{children:`./your_bittorrent.sh`}),`) will automatically compile your code using `,_jsx(_components.code,{children:`mvn`}),` before executing it. It’ll\nlook something like this:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`#!/bin/sh`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mvn`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -B`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --quiet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` package`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -Ddir=/tmp/codecrafters-redis-target`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`exec`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` java`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -jar`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/codecrafters-redis-target/java_redis.jar`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`$@`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When running tests on our servers, the `,_jsx(_components.code,{children:`mvn`}),` command will only be run once and then commented out. This ensures that each test only runs the `,_jsx(_components.code,{children:`java -jar ...`}),` line.`]}),`\n`,_jsx(Heading,{level:`2`,id:`file-structure`,children:`File structure`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The files for your solution are placed in the `,_jsx(_components.code,{children:`src/main/java`}),` directory.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`src/main/java/Main.java`}),` contains the `,_jsx(_components.code,{children:`main`}),` function, which is what the test runner executes.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-more-files`,children:`Adding more files`}),`\n`,_jsxs(_components.p,{children:[`You can add more files and directories to `,_jsx(_components.code,{children:`src/main/java`}),`. The test runner will include them when compiling your code.`]}),`\n`,_jsxs(_components.p,{children:[`For example, if you added a file at `,_jsx(_components.code,{children:`src/main/java/Foo.java`}),`, you could use it like so:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`src/main/java/Main.java`,numberOfLines:`5`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// calls the method foo() from Foo class in Foo.java`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`src/main/java/Foo.java`,numberOfLines:`5`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`out`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`println`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello world!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`By default, all files in `,_jsx(_components.code,{children:`src/main/java`}),` are in the `,_jsx(_components.code,{children:`default`}),` package. If you want to extract files into a different package,\nyou’ll need to add a `,_jsx(_components.code,{children:`package`}),` declaration to the top of the file and change its location. Here’s what that’d look like:`]}),`\n`,_jsxs(_components.p,{children:[`Let’s say you wanted to extract `,_jsx(_components.code,{children:`Foo.java`}),` into the `,_jsx(_components.code,{children:`com.example`}),` package. Store `,_jsx(_components.code,{children:`Foo.java`}),` at `,_jsx(_components.code,{children:`src/main/java/com/example/Foo.java`}),` and add the following lines:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`src/main/java/com/example/Foo.java`,numberOfLines:`7`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.example`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`public`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` class`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` F`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`oo {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` public`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` static`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` foo() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` S`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ystem.out.println(\"`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`H`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ello world!\");`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`src/main/java/Main.java`,numberOfLines:`7`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.example.Foo;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`foo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Uses the foo function from Foo class in the com.example package`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Use an IDE like IntelliJ IDEA which will automatically offer to move your file\nto a directory matching the package name.`})}),`\n`,_jsx(Heading,{level:`2`,id:`adding-dependencies`,children:`Adding dependencies`}),`\n`,_jsxs(_components.p,{children:[`You can add dependencies to your project by adding them to your `,_jsx(_components.code,{children:`pom.xml`}),` file.`]}),`\n`,_jsxs(_components.p,{children:[`For example, to add the gson library, add the following to the `,_jsx(_components.code,{children:`\u003cdependencies>`}),` section in your `,_jsx(_components.code,{children:`pom.xml`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`xml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`com.google.code.gson`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`gson`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`2.8.6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When you push your code next, the runner will automatically download the dependency.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Java","description":"Learn how to solve CodeCrafters challenges in Java","href":"/challenges/language-support/java","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Local development","slug":"local-development","depth":2,"children":[]},{"title":"File structure","slug":"file-structure","depth":2,"children":[]},{"title":"Adding more files","slug":"adding-more-files","depth":2,"children":[]},{"title":"Adding dependencies","slug":"adding-dependencies","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/codecrafters/d677637e7250174a/facebook-pixel.js"],"subdomain":"codecrafters","siteName":"CodeCrafters","title":"Java - CodeCrafters","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-11-24T05:42:11.499Z","originalFileLocation":"challenges/language-support/java.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to solve CodeCrafters challenges in Java\">\u003cmeta data-mint-head name=\"application-name\" content=\"CodeCrafters\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Java - CodeCrafters\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to solve CodeCrafters challenges in Java\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CodeCrafters\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.codecrafters.io/challenges/language-support/java\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://codecrafters.mintlify.app/_mintlify/api/og/v2?division=Language+Support\u0026amp;title=Java\u0026amp;description=Learn+how+to+solve+CodeCrafters+challenges+in+Java\u0026amp;theme=5efe4eff3bb454a030fbf1e6\u0026amp;signature=df70ecf290647fe7c0509cad80483c25584d0ccdbea1e13babaf76e0dfccae86\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Java - CodeCrafters\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to solve CodeCrafters challenges in Java\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://codecrafters.mintlify.app/_mintlify/api/og/v2?division=Language+Support\u0026amp;title=Java\u0026amp;description=Learn+how+to+solve+CodeCrafters+challenges+in+Java\u0026amp;theme=5efe4eff3bb454a030fbf1e6\u0026amp;signature=df70ecf290647fe7c0509cad80483c25584d0ccdbea1e13babaf76e0dfccae86\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/codecrafters/PBz8LSjZyTkbb-oc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CodeCrafters\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#14B8A6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.codecrafters.io/challenges/language-support/java\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/challenges/language-support/java.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.codecrafters.io/#organization\",\"name\":\"CodeCrafters\",\"url\":\"https://docs.codecrafters.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/codecrafters/rBHxsHriiZT92xcM/logo/light.svg?fit=max\u0026auto=format\u0026n=rBHxsHriiZT92xcM\u0026q=85\u0026s=c25b07c68301871e1fb0d262abf5b3be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.codecrafters.io#website\",\"name\":\"CodeCrafters\",\"url\":\"https://docs.codecrafters.io\",\"publisher\":{\"@id\":\"https://docs.codecrafters.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.codecrafters.io/challenges/language-support/java#webpage\",\"url\":\"https://docs.codecrafters.io/challenges/language-support/java\",\"name\":\"Java\",\"description\":\"Learn how to solve CodeCrafters challenges in Java\",\"dateModified\":\"2025-11-24T05:42:11.499Z\",\"isPartOf\":{\"@id\":\"https://docs.codecrafters.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.codecrafters.io/challenges/language-support/java#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.codecrafters.io/challenges/language-support/java#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Challenges\",\"item\":\"https://docs.codecrafters.io/challenges/language-support/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Language Support\",\"item\":\"https://docs.codecrafters.io/challenges/language-support/introduction\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Java\",\"item\":\"https://docs.codecrafters.io/challenges/language-support/java\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.codecrafters.io/challenges/language-support/java#article\",\"headline\":\"Java\",\"name\":\"Java\",\"description\":\"Learn how to solve CodeCrafters challenges in Java\",\"url\":\"https://docs.codecrafters.io/challenges/language-support/java\",\"mainEntityOfPage\":{\"@id\":\"https://docs.codecrafters.io/challenges/language-support/java#webpage\"},\"dateModified\":\"2025-11-24T05:42:11.499Z\",\"publisher\":{\"@id\":\"https://docs.codecrafters.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.codecrafters.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CodeCrafters\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"CodeCrafters","nav":{"global":{"anchors":[{"anchor":"Forum","href":"https://forum.codecrafters.io/","icon":"discourse","color":{"light":"#5865F2","dark":"#5865F2"}},{"anchor":"Demo","href":"https://codecrafters.io/videos/demo","icon":"circle-play","color":{"light":"#00EFD1","dark":"#00EFD1"}}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"}]},{"group":"Membership Benefits","pages":[{"title":"Unlimited content access","href":"/membership/content"},{"title":"Turbo test runs","href":"/membership/turbo"},{"title":"Code examples","href":"/membership/code-examples"},{"title":"Anonymous mode","href":"/membership/anonymous-mode"},{"title":"Perks","href":"/membership/perks"}]},{"group":"Features","pages":[{"title":"Publish to GitHub","href":"/features/publish-to-github"}]},{"group":"Challenges","pages":[{"group":"Language Support","pages":[{"title":"Introduction","href":"/challenges/language-support/introduction"},{"title":"C++","href":"/challenges/language-support/cpp"},{"title":"C#","href":"/challenges/language-support/csharp"},{"title":"Go","description":"Learn how to solve CodeCrafters challenges in Go","href":"/challenges/language-support/go"},{"title":"Java","href":"/challenges/language-support/java"},{"title":"JavaScript","description":"Learn how to solve CodeCrafters challenges in JavaScript","href":"/challenges/language-support/javascript"},{"title":"Kotlin","href":"/challenges/language-support/kotlin"},{"title":"OCaml","href":"/challenges/language-support/ocaml"},{"title":"Python","href":"/challenges/language-support/python"},{"title":"Ruby","href":"/challenges/language-support/ruby"},{"title":"Rust","href":"/challenges/language-support/rust"},{"title":"TypeScript","href":"/challenges/language-support/typescript"},{"title":"Zig","href":"/challenges/language-support/zig"}]},{"title":"Program Interface","href":"/challenges/program-interface"},{"title":"How do I debug test failures?","href":"/challenges/debug-test-failures"},{"title":"Can I install additional dependencies?","href":"/challenges/install-additional-dependencies"},{"title":"Can I re-attempt a challenge in a different language?","href":"/challenges/reattempt-challenge"},{"title":"How do I debug test failures in the Redis Challenge?","href":"/challenges/debug-test-failures-redis"},{"title":"How do challenges work?","href":"/challenges/how-challenges-work"}]},{"group":"Troubleshooting","pages":[{"title":"Large files found","href":"/troubleshooting/large-files"},{"title":"Git clone errors","href":"/troubleshooting/fix-clone-errors"},{"title":"No changes found","href":"/troubleshooting/no-changes"}]},{"group":"CLI","pages":[{"title":"How do I install the CLI?","href":"/cli/installation"},{"title":"How do I use the CLI?","href":"/cli/usage"},{"title":"How do I update the CLI?","href":"/cli/update"},{"title":"How do I uninstall the CLI?","href":"/cli/uninstall"}]},{"group":"Billing","pages":[{"title":"How do I get an invoice?","href":"/billing/get-an-invoice"},{"title":"How do I get a local currency invoice?","href":"/billing/get-a-local-currency-invoice"}]},{"group":"Community","pages":[{"title":"How do I get access the Forum?","href":"/community/forum-access"}]},{"group":"Profile Pages","pages":[{"title":"Where is my profile page?","href":"/profile-pages/where-is-my-profile-page"},{"title":"Can I list multiple languages on my profile page?","href":"/profile-pages/list-multiple-languages"}]},{"group":"Account","pages":[{"title":"How do I delete my account?","href":"/account/delete-account"}]}]},{"tab":"Contributor Guides","pages":[{"title":"Contributor Guides","href":"/contributors/introduction"}]}]},"basePath":"","title":"Java - CodeCrafters","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}