java.lang.StringIndexOutOfBoundsException: String index out of range: 0


Samebug tips

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.


7 months ago
Expert tip

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.


,
via oracle.com by Unknown author

Solutions on the web

Solution icon of github
String index out of range: 0

Solution icon of googlegroups
via Google Groups by Smart Mobile App, 1 month ago
String index out of range: 0

Solution icon of openjdk
via JDK Bug System by Webbug Group, 8 months ago
String index out of range: 0

Solution icon of coderanch
via Coderanch by Bryan Peach, 1 year ago
String index out of range: 0

Solution icon of coderanch
via Coderanch by Sreesanth Nair, 1 year ago
String index out of range: 0

Solution icon of coderanch
via Coderanch by chaitanya kiran pvn, 10 months ago
String index out of range: 0

Solution icon of bugzilla
via Eclipse Bugzilla by neale, 1 year ago
String index out of range: 0

Solution icon of bugzilla
via Eclipse Bugzilla by thorsten.schenkel, 1 year ago
String index out of range: 0

Solution icon of bugzilla
via https://bugzilla.redhat.com/bugzilla/ by Jay SenSharma, 1 year ago
String index out of range: 0

Solution icon of bugzilla
via Apache Bugzilla by new_connie, 3 months ago
String index out of range: 0

Stack trace

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:686)
	at com.sun.tools.javac.main.Main.processArgs(Main.java:180)
	at com.sun.tools.javac.main.Main.compile(Main.java:309)
	at com.sun.tools.javac.main.Main.compile(Main.java:279)
	at com.sun.tools.javac.main.Main.compile(Main.java:270)
	at com.sun.tools.javac.Main.compile(Main.java:69)
	at com.sun.tools.javac.Main.main(Main.java:54)[Finished in 0.3s with exit code 4]

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 1 month ago
Once, 8 months ago
32257 times, 10 months ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
41 more bugmates