• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic question, please help me guys  RSS feed

 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I have basic question.

I dont know how to import this package:

import org.flexdock.docking.*;
import org.flexdock.docking.defaults.DefaultDockingPort;

am geting error as: this package doesnt exist..

Please help me

Cheers
 
Rajasekar Elango
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Verify if you have packages and class in your class path.
You can use echo $CLASSPATH in unix or echo %CLASSPATH%.

If you are in jar file should be in classpath.

Thanks,
Raja
 
Campbell Ritchie
Marshal
Posts: 55772
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done with the files which are supposed to be in the flexdock package?
Have you got the same folder containing your classes as the folder which contains the "com" folder?
You will have a hierarchy of folders, from
root--->classesFolder--->projectFolder--->com--->flexdock--->docking--->defaults.
Your classes ought to be where it will be obvious how to get to the "com" folder.
If your classes are in, say,
root--->classesFolder--->projectFolder--->com--->elango--->javaranch--->forum,
then they ought to have
"package com.elango.javaranch.forum;" in, and the "com" ought to refer to the same folder.

Are you using command prompt (if in Windows) or an IDE?
If using command prompt you can put all the files in a single folder, navigate to it, then using the
javac -d . MyFile.java
command, both compile the file and create the correct directories simultaneously.
If com.flexdock is in a jar, there are ways or adding the jar to the classpath on command prompt, but I can't remember how to do it. It has been discussed on the Ranch before. You can probably find it with "search."

If you are using an IDE, then use the IDE's help to import the .jar.

Other people might be able to help more.
 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ritchie and Elango,

These are my folders,,

D:\Flexdoc\ felx****.jar
D:\Flexdoc\docs\api\org
C:\Program Files\Java\j2re1.4.2_04\lib

i have tried in setting the ENVI var.. still no use

am using Eclipse, actually I donnt know, how to import, i have tried to import, still same error. please help me guys, am really fedup.

I have used this link to import,
http://www.cs.umd.edu/class/fall2004/cmsc131/EclipseTutorial/advanced.html
but no use... Please help me guys...

Cheers
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey dude.

Sounds like a classpath issue. What environment are you running in?

One test might be to find the jar or zip file those packages are in. Then maybe drop them in the lib directory of the JRE or SDK. It's a pretty big hammer to drop placing jar files in these lib directories, but it might just work.

Good luck.
[ August 27, 2006: Message edited by: Bear Bibeault ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!