Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 585
  • Last Modified:

Import self-made packages

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
JTWolfman
Asked:
JTWolfman
  • 3
  • 2
  • 2
1 Solution
 
CEHJCommented:
Make sure you have the import xxx.yyy.zzz statement at the top of your code
0
 
jimmackCommented:
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
 
JTWolfmanAuthor Commented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
jimmackCommented:
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
 
JTWolfmanAuthor Commented:
Oops, what a big *DOH*. thanks man, you earn points do to a braing fart.
0
 
jimmackCommented:
;-)
0
 
CEHJCommented:
>>If this is the case, you need to import ???.Files.

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now