This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes .jar and importing basics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark ".jar and importing basics" Watch ".jar and importing basics" New topic
Author

.jar and importing basics

pandu chinnu
Greenhorn

Joined: Nov 21, 2006
Posts: 16
Hi,

I have been creating new projects and have created simple java programs in eclipse. Now I wanted to import an external .jar(.zip) file. I created a new project and right clicked > import > Archive file >Browse > select archive file and press finish. This imports the .jar file. However the .jar file is imported under the project name and i can't see any .java or .class files.

When I try and run,,,,,,it dosen't execute.

Can somebody give me the basics of jar file and how to execute it in eclipse?

Thanks in advance
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Have you worked this out? It seems a long time since you posted. I haven't been able to go onto the Ranch website for a few weeks; have been too busy.

If I remember correctly in Eclipse,
  • Look in the left-hand pane called "package"
  • Right-click the name of the project you are interested in
  • Click "properties," usually at the bottom of the list.
  • Click "Java build path"
  • Click the "libraries" tab.
  • Click "add external jars"
  • Using the "browse" option (or otherwise) find the .jar you need.
  • Highlight the .jar you want, click OK
  • OK again
  • All done
  •  
    wood burning stoves
     
    subject: .jar and importing basics
     
    Similar Threads
    Is it possible to create an eclipse project from an existing EAR file?
    eclipse
    Eclipse "plugin project" : can it depend on a standard java project?
    Stored Procedure java code error
    Eclipse Jar Bundling