• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiling Pacakage  RSS feed

 
muhsin sabeer
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have three packages. All three packages are under one package(main package). The structure is like:
MainPackage
+-
package1
+-
package2
+-
package3

In my code pacakge2 doesn't import any other two packages. So it compiles fine. package3 imports package2. When I compile package3, the error "MainPackage.package2 does not exist". Can anyone help me where am wrong?

Thanks ranchers.
 
Campbell Ritchie
Marshal
Posts: 56521
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell us exactly what you are doing.
I shan't be around to reply later myself, I am afraid.
CR
 
muhsin sabeer
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compile java files in those packages. But I end up with compile error.
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add the all ready compiled packages to your class-path.
 
muhsin sabeer
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still having trouble with compilation. Does it have another command to compile the packages? or just ordinary like javac myfile.java?
 
muhsin sabeer
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all.

I fixed the error. Now it works perfect.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!