Author Topic: [Java] Packages?  (Read 2396 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
[Java] Packages?
« on: September 18, 2005, 01:09:11 am »
Whenever I put package util; in my code (before the imports), I get an error that util is not the expected package.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [Java] Packages?
« Reply #1 on: September 18, 2005, 10:06:13 am »
If you put "package util;" it has to be in the folder "util", and has to be compiled from outside the folder (javac util/whatever.java). 

If you're in Eclipse, just create a package in the window thingy, then create the Java file inside of it. 

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Java] Packages?
« Reply #2 on: September 18, 2005, 01:07:41 pm »
Oh. Yay!

EDIT -
Got it! Pound it, iago! *holds out fist*
« Last Edit: September 18, 2005, 01:09:50 pm by Joe[e2] »
I'd personally do as Joe suggests

You might be right about that, Joe.