[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

basic java question.

I am getting compiler error when i am using method from different package even if i import that package.
0
Anj78
Asked:
Anj78
1 Solution
 
zzynxSoftware engineerCommented:
Show us your code + the compiler error
0
 
Anj78Author Commented:


It is not giving me at the time of compiling.When i am trying to debug it.it says "can not resolve"


package com.XYZ.login.gui;


import  com.pjx.gui.view.laf.plaf.defaultlaf.*;
/**
 * @ *
 */
public class XYZDefaultLookAndFeel extends DefaultLookAndFeel  {
0
 
zzynxSoftware engineerCommented:
>> It is not giving me at the time of compiling.
Then it's no compiler error

>> When i am trying to debug it
In what IDE?

>> it says "can not resolve"
Please post the complete error you get
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
Anj78Author Commented:
Sorry it is giving me error at the time of compiling."package does not exit"and "Can not resolve ".
0
 
brunoguimaraesCommented:
The package you're importing has to be on your buildpath.

Are you using Eclipse?
0
 
Anj78Author Commented:
yes.
0
 
zzynxSoftware engineerCommented:
- Right-click your project
- Choose "Properties"
- Click the "Java Build Path" node in the tree on the lef
- Select the "Libraries" tab on the right
- Add the jar containing com.pjx.gui.view.laf.plaf.defaultlaf.*
0
 
zzynxSoftware engineerCommented:
Or if you have the source of it:
- Select the "Source" tab on the right
- Add the path to the "Included" node
0
 
Anj78Author Commented:
There are "Add Jars""Add external Jars" tabs .How do i find the related jar.I am new for eclipse.
Thanks.
0
 
zzynxSoftware engineerCommented:
>> How do i find the related jar
Where did you place it?
When you installed the LAF?
0
 
Anj78Author Commented:
it was ther before.In  build path ,if i have to place DefaulltLookAnd Feel 's jar file .which location i have to search for it?Like package or specific jar file.Thanks.
0
 
zzynxSoftware engineerCommented:
>> it was ther before
What's the website of the package?
Where's the documentation of it?

>> import  com.pjx.gui.view.laf.plaf.defaultlaf.*;
How do you know that you have to write this import?
0
 
Anj78Author Commented:
because i have class in this package and i want the method of this class.
0
 
zzynxSoftware engineerCommented:
I was not asking why you import it.
I was asking how do you know you have to write that import in exactly that way.

com.pjx.gui.....

What does pjx stand for?
Where did you find that package? What's its website?
Or is it a package written by a colleague of you? Or...?
0
 
zzynxSoftware engineerCommented:
>> it was ther before
Who installed it?
0
 
agsuvidhaCommented:
The problem seems like your classpath is not set
Set the classpath to the package where your class is stored...as
set classpath=%classpath%;c:\.....\...
nd then import the package of that class in ur source file...

It will work fine
0
 
zzynxSoftware engineerCommented:
>> How do i find the related jar
You could do a file search for all the *.jar files onyour disk.
Hopefully there's one you recognize as the one you're searching for...
0
 
zzynxSoftware engineerCommented:
Thanx 4 axxepting
0

Featured Post

Independent Software Vendors: 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!

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