Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix terminal color on Windows #176

Merged
merged 2 commits into from
Dec 1, 2024
Merged

Fix terminal color on Windows #176

merged 2 commits into from
Dec 1, 2024

Conversation

Dreeam-qwq
Copy link
Member

@Dreeam-qwq Dreeam-qwq commented Nov 30, 2024

Windows doesn't have environment variables TERM and COLORTERM by default, but we assuming that it supports the truecolor for terminal.

Welcome to test it on:

  • Java 21 and Java 22

and,

  • Windows, Linux, Pterodactyl panel or MSCM panel.

Things to test:

Test Jar: Leaf 1.21.1.zip

Tested on my side that all can work fine.

Windows doesn't have environment variables TERM and COLORTERM by default, but we assuming that it supports the `truecolor` for terminal.
@MC-XiaoHei
Copy link

MC-XiaoHei commented Nov 30, 2024

Test on Windows 11 Canary 27754.1000
Java Info:

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

Test 1, 2 passed.

@Kotori0629
Copy link

a24768e496207b19655d77dc11bef902
container@pterodactyl~ java -version
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode, sharing)
container@pterodactyl~ java -Xms128M -Xmx12288M -XX:MaxRAMPercentage=95.0 -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -Dlog4j2.formatMsgNoLookups=true -jar server.jar

Tested on Pterodactyl, it worked

@kidofcubes
Copy link
Contributor

image openjdk version "21.0.4" 2024-07-16 OpenJDK Runtime Environment (build 21.0.4+7) OpenJDK 64-Bit Server VM (build 21.0.4+7, mixed mode, sharing)

works on linux

@HaHaWTH
Copy link
Member

HaHaWTH commented Nov 30, 2024

Env: Java 21 (Java HotSpot(TM) 64-Bit Server VM 21.0.4+8-LTS-jvmci-23.1-b41; Oracle Corporation Oracle GraalVM 21.0.4+8.1) on Windows 10 10.0 (amd64)
IMG_5440

@HaHaWTH HaHaWTH linked an issue Nov 30, 2024 that may be closed by this pull request
4 tasks
@Dreeam-qwq Dreeam-qwq merged commit 0510b51 into ver/1.21.1 Dec 1, 2024
1 check passed
@Dreeam-qwq Dreeam-qwq deleted the fix/terminal-color branch December 9, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Console log color missing since Leaf a3f3dba
5 participants