Solved

Import self-made packages

Posted on 2003-11-09
7
567 Views
Last Modified: 2006-11-17
Im using JBuilder 9 and i'm trying to import some of my packages into my current .java files, but it says it cant find them even though when i type import, the menu appears and i can select the package. It is just some basic code, but it just ont grab those packages. Please tell me what im doing wrong.
0
Comment
Question by:JTWolfman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9710457
Make sure you have the import xxx.yyy.zzz statement at the top of your code
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9710472
It looks more like the classpath isn't including the directory where your .class files are (for your existing packages).  If they're in a jar, you'll need to include the jar file itself, not just the directory that contains it.
0
 

Author Comment

by:JTWolfman
ID: 9710493
Ok, i got a package Files and a package Browsers, in a file inside of Browsers, i try and use a contructor in the Files package under the class setName.
I try and import using import Files.* to get all of them since i will use them all eventually, but it says "Package Files does not exist" even though it is there.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
jimmack earned 70 total points
ID: 9710504
Do you mean that you have a class defined as:

package Files;

import...

public class setName
{
    .
    .
}

From the naming convention you are using, it looks like you might actually mean:

package ???;

public class Files
{
    public void setName(...)
    {
        .
    }
}

If this is the case, you need to import ???.Files.

0
 

Author Comment

by:JTWolfman
ID: 9710534
Oops, what a big *DOH*. thanks man, you earn points do to a braing fart.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9710570
;-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9710658
>>If this is the case, you need to import ???.Files.

Isn't this precisely what i said in the first place?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SHA2 certs for IIS AND Java? 2 136
servlet and mdb, jms error 1 82
jmeter usage 4 68
activeMQ Queue Messages Enqueued and Messages Dequeued 1 119
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question