Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » External .jar isnt recognized
External .jar isnt recognized [message #1468257] Mon, 10 November 2014 18:02 Go to next message
thorsten meier is currently offline thorsten meierFriend
Messages: 3
Registered: November 2014
Junior Member
Hi,

ive got a jar thats attached via:
Build Path -> Configure Build Path .... -> Libraries -> Add External Jars

the .jar contains some files one of them is:
package omg.somewhere.swt.experience1;

import java.math.BigDecimal;

public interface Bestellposition extends Entity {

	int getAnzahl();
	void setAnzahl(int anzahl);

	String getBezeichnung();
	void setBezeichnung(String bezeichnung);

	BigDecimal getPreis();
	void setPreis(BigDecimal preis);

	Produkt getProdukt();
	void setProdukt(Produkt produkt);

}



its location inside the jar is:
omg/somewhere/swt/experience1/Bestellposition.java


but i cant use:
import omg.somewhere.swt.experience1.Bestellposition;


its underlined red, the import cannot be resolved.
why is that?

i already refreshed the project after adding the jar, no change.
Re: External .jar isnt recognized [message #1468399 is a reply to message #1468257] Mon, 10 November 2014 20:36 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3905
Registered: July 2009
Senior Member

You can only use *compiled* class files from a jar. ".class", not ".java" source files.

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:.location file format
Next Topic:RefactoringCore.getRefactoringContribution(IJavaRefactorings.MOVE) returning NULL
Goto Forum:
  


Current Time: Sat Nov 28 18:22:38 GMT 2020

Powered by FUDForum. Page generated in 0.01335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top