When you do things right, people won't be sure you've done anything at all.
Justin Calleja wrote:One thing I'm finding a bit odd is that the .class files (which I can open and view in the IDE... i.e. I can view the source) have no package definition in them
Justin Calleja wrote:. But when I import them from classes I'm making, they come out like this: import javasource.Picture;
luck, db
There are no new questions, but there may be new answers.
Welcome to JavaRanch!
Are you trying to instantiate a Picture object, or use one of the Picture class' methods?
What happens if you try running from the command line?
Also: I think (not sure) when you use eclipse, you might need to set a classpath in your system properties.... maybe another rancher knows for sure.
Classes in a package cannot use classes in the default package (i.e. without a package statement). If you need to use the Picture class in any class other than one in the same default package, you will need to put it in a package and either import it or use a fully qualified name when referring to it.
When you do things right, people won't be sure you've done anything at all.
www.cs-repository.info
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|