File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
why .java filename constraint ?
prashant p joshi
Greenhorn
Joined: Jul 22, 2002
Posts: 3
posted
Jul 22, 2002 00:43:00
0
why .java filename must be same as public class name defined in that file?
Sayed Ibrahim Hashimi
Ranch Hand
Joined: May 17, 2001
Posts: 148
posted
Jul 22, 2002 04:25:00
0
I think its because that is how the compiler finds the class files. By package and class name.
SCJP 1.4<br /><a href="http://www.cise.ufl.edu/~sih" target="_blank" rel="nofollow">www.cise.ufl.edu/~sih</a>
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
Jul 22, 2002 05:31:00
0
It's just a convenience for the compiler.
It's one of the tricks which enable recompiling a whole Java project to be acceptably quick, without needing something like a "makefile" to tell it what to compile.
A Convergent Visionary
~
Frank's Punchbarrel Blog
~
LinkedIn profile
I agree. Here's the link:
http://zeroturnaround.com/jrebel/download
subject: why .java filename constraint ?
Similar Threads
How to avoid hardcodings while testing
role of interpreter and jti
download link in jsp ?
Slashes being removed when getting URL streams
Empty java file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter