2026-02-02

Running Java in Codex Web

Programming
Notes
This article was translated by GPT-5.4. The original is here.

When I had Codex Web work on a Java (Gradle) repository, the build failed. I figured out how to fix it, so I am leaving a note here.

Settings

The solution was posted on the OpenAI Developer Community forum.

Open Codex environment settings and select the environment you use for Java repository development. Click "Edit" and paste the following script into "Setup script."

1
#!/usr/bin/env bash
2
set -euxo pipefail # fail hard, fail fast, print everything
3
4
# 1. System update & required packages
5
apt-get update -qq
6
apt-get install -yqq maven
7
8
# 2. Verify the install (good for debugging)
9
mvn -v
10
11
# 3. Configure Maven to use the Codex proxy
12
mkdir -p ~/.m2
13
cat > ~/.m2/settings.xml <<'EOF'
14
<settings>
15
<proxies>
16
<proxy>
17
<id>codexProxy</id>
18
<active>true</active>
19
<protocol>http</protocol>
20
<host>proxy</host>
21
<port>8080</port>
22
</proxy>
23
</proxies>
24
</settings>
25
EOF

I removed step 4 from the referenced post. If I left it in, it caused an error instead. With this, I can now do Java development from Codex Web 🎉

Effective Java 第3版

Effective Java 第3版

Javaによる関数型プログラミング ―Java 8ラムダ式とStream

Javaによる関数型プログラミング ―Java 8ラムダ式とStream

Amazon アソシエイトについて

この記事には Amazon アソシエイトのリンクが含まれています。Amazonのアソシエイトとして、SuzumiyaAoba は適格販売により収入を得ています。