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.

[SOLVED] [1.17.1] Error when trying to use :runClient / java.lang.StringIndexOutOfBoundsException: begin 0, end -1, lenght 3

Featured Replies

Posted

After having a conversation with SizableShrimp in the Forge Discord I wanted to aks for help on the forums.

My mod works completely fine, it compiles fine, genIntellijRuns works fine, but every time I try to use :runClient I experience this error: https://pastebin.com/ekaF1MBL

What I have been told is that it is trying to load the eez class from the client-extra.jar. Someone else with a similiar issue deleted all the classes in this .jar and which fixed the issue, but I'm still getting the same error after deleting those classes.

I already did things like invalidate caches, and tried to add this to runs in the build.gradle: property 'legacyClassPath', '{minecraft_classpath}' but nothing works.

I also tried to run the latest MDK without changing any code but got the same error.

 

Does anyone else have an idea what I need to do? Or is this an issue on Forge's side that I need to report on GitHub?

Edited by CheckerMark79
Solved issue.

  • CheckerMark79 changed the title to [1.17.1] Error when trying to use :runClient / The game loading classes it shouldn't
  • Author

Alright, thanks to someone from the Forge Discord I managed to solve the issue.

If anyone ever gets this error: java.lang.RuntimeException: java.lang.StringIndexOutOfBounds: begin 0, end -1, length 3

Delete the client-extra.jar, found under external libraries, and refresh your gradle.

Also make sure you are using Java 16 (As of 1.17+)

This solved the issue for me, which took me days.

  • CheckerMark79 changed the title to [SOLVED] [1.17.1] Error when trying to use :runClient / java.lang.StringIndexOutOfBoundsException: begin 0, end -1, lenght 3

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.