Sublime Forum

Java Case Sensitive Glitch/Sublime text glitch(maybe)

#1

This is my java code:-


I can’t UNDERSTAND that what is wrong with my code… I used javac groot.java command in CMD, terminus and so on, and it worked fine. But when I use this in build system, it goes wrong :neutral_face::neutral_face::neutral_face:. And when I changed the class name into Groot(because Groot.java is the file name, not groot.java), it worked :expressionless::expressionless::expressionless:. What is the problem!!! Even I use my own custom build system, and it shows the same error. So, how to fix this GLITCH? :thinking::thinking::thinking::upside_down_face::upside_down_face::upside_down_face:

Edit: When I typed javac Groot.java(instead of javac groot.java) in command line, it gave the same error. So, maybe it’s a java problem, not sublime text issue. But, I’m not sure yet.

0 Likes

#2

In Java, the public class name must also be the same name as the file (case sensitive). Change public class groot to public class Groot.

0 Likes

#3

Oh, so it’s a java error…

0 Likes