• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Doubt On Java Compiler

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a small doubt. I have a java file named "HELLO.java". I am able to compile it as "javac hello.java".Though java is case sensitive i am able to get the class file.But i am not to run it as "java hello" and i have execute the class file as "java HELLO".
How is this possible???
Thanx in advance.
Regards,
Reddy.



 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because the javac command uses your OS to find the file to compile. Your OS may or may not be case sensitive. However, the java (interpreter) command uses the JVM to find the class that has been loaded into it, and the JVM is always case sensitive.

-Nate
 
reply
    Bookmark Topic Watch Topic
  • New Topic