News:

Help! We're trapped in the computer, and the computer is trapped in 2008! Someone call the time police!

Main Menu

[Java] Packages?

Started by Joe, September 18, 2005, 01:09:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

Whenever I put package util; in my code (before the imports), I get an error that util is not the expected package.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


iago

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. 

Joe

#2
Oh. Yay!

EDIT -
Got it! Pound it, iago! *holds out fist*
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.