Confusion with java syntax rules...

I'm confused with what the default visibility of a class variable. I am using an editor called eclipse and it seems to follow the rule of default visibility correctly: A class in another package cannot see the variable of a class in another package which has default visibility. However, when I compile with the command line "javac...", it seems that it is treating default as public... Can someone tell me what is wrong?

[429 byte] By [JNooreza] at [2007-10-3 3:06:30]
# 1
Be sure to mark the variables as private, otherwise it defaults to being public.This is true with most "modifiers" (the public, private, and protected things).
compadrea at 2007-7-14 20:56:46 > top of Java-index,Java Essentials,Java Programming...
# 2
But everywhere I read...if you don't put a modifier on a variable it defaults to "package", which means only classes that are within the package can see it. The Eclpise ID enforces this rule, but the java compiler on the command line follows the rule that default is public, not
JNooreza at 2007-7-14 20:56:46 > top of Java-index,Java Essentials,Java Programming...
# 3

The default is package.

If you don't specify that a class belongs to a particular package, it belongs to the default package. If you have multiple classes in the default package, they have access to the package variables in the other classes.

This will appear to be public access, but it isn't.

mvantuyla at 2007-7-14 20:56:46 > top of Java-index,Java Essentials,Java Programming...
# 4
Ok...problem solved...I had classes in the default package...I didn't realize that would be a problem....Thanks for all your help...!
JNooreza at 2007-7-14 20:56:46 > top of Java-index,Java Essentials,Java Programming...
# 5
> Be sure to mark the variables as private, otherwise> it defaults to being public.> > This is true with most "modifiers" (the public, private, and protected things).This is entirely untrue.
ejpa at 2007-7-14 20:56:46 > top of Java-index,Java Essentials,Java Programming...