# java package errors

## Recommended Posts

I currently having huge problems with java packages. I coding my project with eclipse on my WinXp machine. It works just fine. but when i try to compile my code on a Red hat machine i have to remove the line: package package_name otherwise the program refuse to compile unless i copile like this: javac *.java but then i get strange linker errors when i try to run the class with the main function. java package_name.main_class doesn't work either.

##### Share on other sites
have you set the class path yet?

##### Share on other sites
Are you sure that the file in which is written

package package_name;

is located in the package_name directory ?

Chman

##### Share on other sites

unfortunately yes and yes. But i guess i'm one or both of those wrong. :(

##### Share on other sites
Or maybe it's something in eclipse that you haven't properly set... but if it's the case, I can't help you more because I don't use Eclipse at all...

Good luck ! I'm sure there are some Eclipse gurus on this board...

Chman

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628395
• Total Posts
2982437

• 10
• 9
• 19
• 24
• 10