|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to do my summer assignments for my java class next year, and i'm having some problems.. we're supposed to work everything out for ourselves, and i haven't taken any classes in java yet(>.<) so i'd REALLY appreciate if someone could help me out.
The biggest problem I'm having is my complete inability to import tools of any sort. I've copied over the codes i've been told to copy, all of which include some package that's supposed to be imported. I've got all of the things on my computer, but every time i try to compile the program, JCreator tells me that the packages don't exist. Is there a certain place I need to move the files.. how can I fix this? email: juli.jones@gmail.com (put "java" in the subject line) AIM: jjflyhighx or reply here, whatever. thanks! |
|
#2
|
|||
|
|||
|
Have you set your CLASSPATH variable properly?
Also, the package mssing may mean that you may not be inside a folder with the same name as the package name. Please post your sample code here (a simple one), then it would be easier for others to help with your progamming problem. ----------------------- Programming ( Assignment / Project ) Help |
|
#3
|
|||
|
|||
|
Quote:
Well, I did say I was new to this, didn't I? Anyway, this is the code I'm trying to work with.. import apcslib.*; public class DrawSquare { public static void main(String[] args) { DrawingTool pencil; SketchPad paper; paper= new SketchPad(300, 300); pencil = new DrawingTool(paper); pencil.forward(100); pencil.turnLeft(90); pencil.forward(100); pencil.turnLeft(90); pencil.forward(100); pencil.turnLeft(90); pencil.forward(100); } } Yeah, unbearably simple. But when I try to compile it... --------------------Configuration: DrawSquare - j2sdk1.4.2_08 <Default>-------------------- javac: no source files Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -help Print a synopsis of standard options Process completed. |
|
#4
|
||||
|
||||
|
Where are you keeping the apcslib package?
Is it a single file (likely called apcslib.jar), or is it a folder with a bunch of class files inside? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > importing tools |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|