Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error: Could not find or load main class java Caused by: java.lang.ClassNotFoundException: java

Featured Replies

Posted

I'm unable to run the server, because of
Error: Could not find or load main class java
Caused by: java.lang.ClassNotFoundException: java
This is what it says in the terminal. I'm on Linux (Mint, 21), trying to run the server from terminal.

I have Jva installed, openjdk version "17.0.4" 2022-07-19.

Obviously, there is no log.

  • Author

I'm using the script forge comes with. It's just this:
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.19.2-43.1.47/unix_args.txt --universe /mnt/D/MCServer/worlds/ --world Anbechacha "$@"
(With specification, which world to load.)

  • Author

Solved.
Solution? Don't be stupid.
Basically, I had „java -Xms8G -Xmx8G …“ in my „user_jvm_args.txt“ file. Meaning, when combining, the command was like „java java -Xms8G -Xmx8G“. The „java“ was there twice.

I knew it will be something stupid. I'm not surprised.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.