Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to use Referenced libraries of eclipse while conveting into jar file(Library not referenced while converting java class to jar file)
How to use Referenced libraries of eclipse while conveting into jar file [message #693790] Thu, 07 July 2011 08:18 Go to next message
rajee  is currently offline rajee Friend
Messages: 1
Registered: July 2011
Junior Member
Hi ,

I have created a java project using eclipse.
In that i have java class and referenced libraries which are jar files referencing lib folder. I referenced by
Rightclick JRE SystemLibrary -> build path -> configure build path -> Add jars -> added the jars from lib folder in same path.

It compiles and runs fine in eclipse.
But when i run in cmd prompt using javac classfilename it says the classes i referenced not found error.

How should i refer libraries while running outside eclipse.
Why is it running fine in eclipse but not outside?
Is the method what i have done is right?

Thanks,
Rajee
Re: How to use Referenced libraries of eclipse while conveting into jar file [message #695147 is a reply to message #693790] Mon, 11 July 2011 05:53 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
When you add jars to the build path, the eclipse compiler knows where to pick up the dependent jar files. The javac doesn't know about eclipse projects and hence don't know about the dependent jar files. You have to specify the path of the jars using the javac option -cp.
Previous Topic:Recover eclipse IDE menu icons on Gnome
Next Topic:Eclipse needs to be unzipped every time?
Goto Forum:
  


Current Time: Tue Mar 19 03:25:14 GMT 2024

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

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

Back to the top