Academic Tutorials

English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting

Introduction to Eclipse
Installing Eclipse
Launching Eclipse
Coding in Eclipse
Resetting a Perspective
Quitting Eclipse
Eclipse Managing Homeworks
Eclipse Other Topics

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
Apple Script
PL/SQL Tutorial
SQL Server
.NET (dotnet)
.Net Mobile
C# : C Sharp
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Assembly Language
Forth Programming
Lisp Programming
Data Warehousing
CGI Programming
Emacs Tutorial
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Operating System
Software Testing
SAP Module
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Financial Accounting
Managerial Accounting
Network Sites

Eclipse Other Topics


Managing Files and Projects


Deleting a Class

Now that you know how to create a project and a Java class, you'll need to know how to delete them. To remove a class file from a project, right click on it in the package explorer and select "Delete". A dialog box asking you to confirm will appear. Selecting yes will delete the Java file. Removing a Java file from a Project using this method will delete the Java file from disk. In other words, once you select "Delete", the file will be gone for good, and there is no Undo option on the Eclipse menu to undelete the file. 

Deleting a Project

Deleting a project is safer. Right click on the project in the package viewer.  Again, select "Delete" from the context menu. This time, a dialog box will appear asking you if you want to also delete all of the files in the project's directory. The default is "Do not delete contents". If you select this option, the Java files that were a part of that project will not be deleted.  If you are sure you no longer need the project delete the contents instead.

Importing Files

File System Import

The contents of a Java project are defined by the contents of the folder in your filesystem in which the project is stored. What happens if you want to grab a Java file from some other location and make it part of your current project? This process is called importing and can be done simply with Eclipse: simply right click on the Project in the package explorer and select "Import". This will bring up an Import window that has a couple of options to choose. The two relevant ones are "File System" and "Zip File". If you choose "File System", you can import any Java file from anywhere else on your local file system (i.e., your computer). So you could use this option to pull in a Java file from a directory other than the one you're using for your current Java project. This can be accomplished by first selecting the directory from which you want to import the Java files by either filling in the edit box at the top of the Import window or by selecting it with the "Browse" button. After doing so, you'll see the directory appear in the window on the left. Next to the folder name you'll see a square box that you can check and uncheck. Checking the box means "import everything in that directory". When you click on the directory name, the right window will display all of the files in that directory. Each file will have a similiar checkbox. Each file that is checked will be imported into your project.  Importing files into your project will cause copies to be created of the files you're importing. Thus, once your import a file, a copy of that file will be created and put in your project's directory. Changing the file you've imported will not change the original source file, and vice versa. Deleting a file you've imported from your project will not delete the original file.

Zip (jar) File Import

If you want to import a jar file, you'll want to select your project, right click and choose "Import", but instead choose "Zip file". The options here are very similiar to when importing from the file system, since a Zip/Jar is really a miniature file system stored in a single file. After you choose the Jar file you want to import from, you'll see a directory structure with checkboxes that behaves just like when importing from the file system. Check the folders or individual files you want to import and select "Finish." Again, copies of the contents of the Jar file are made, so you can safely manipulate the files and delete them without affecting the source Jar file.

Exporting Files

This time, we're going to be creating a copy of our project somewhere else. Right click on the project and select "Export". You'll see a list of options similiar to the list for importing files, and again the relevant options are "File System" and "JAR file". This time, the left and right windows show you the contents of your current project. Checking and unchecking items here selects which files in your project you want to export. If you choose "File System", you simply specify the folder where you want to copy your project files and hit "Finish".

Creating a Jar File

Creating a JAR file is slightly more complicated. JAR files can contain either compiled code, source code, or both. By default, Eclipse assumes you're exporting compiled code, so it only lists .class files and other files required by the compiled code. To change this, modify the checkboxes right below the folder/file windows so that "Export generated class files and resources" is unchecked and "Export java source files and resources" is checked. If you are submitting a project via a JAR file and you forget to do this, you will not provide your .java files.  Make sure you export your Java source files if what you want to provide is your source code.  Once that is straightened out, choose a location for your JAR file and then hit "Finish". You can test whether or not your JAR file worked by creating a new Project and importing your JAR file into that new project as described above. If the new project you created looks just like your original project, chances are your export worked correctly.

Displaying Line Numbers in the Editor

You'll probably find it useful to display line numbers in your code editor. When an error occurs in your code, the Java VM will tell you what line number in the source code it occurred on. You can find that line quickly if your line numbers are displayed. In order to do this, select Window -> Preferences on the main menu, which will bring up the Eclipse options, where you can set your preferences (things like font size/color, etc). On the left there is a list of categories. Click the '+' next to "Java" to expand that category, and select "Editor". The right window will be populated with a group of tab panes. You want to select the "Appearance" tab (it is selected by default). Check the second checkbox ("Show line numbers") and hit "OK". You should see line numbers appear in your editor (if you have a Java file open). 

Renaming Projects, Classes, Files and Variables

To change the name of a project, class, file, variable or method highlight the item and select "Refractor"->"Rename".  You will then be prompted to enter a new name.  Hit "OK" and you are done.

Searching in a Java File

IIf you are editing a Java file and you want to locate a specific phrase somewhere in your code, you can use Eclipse's search tool. Eclipse has a more advanced searching mechanism than most Windows applications. Select Search -> Search. This will bring up the search window, which has a series of tabs. To use a standard phrase-based search, select the first tab and enter a search string, and hit search. The search results will be displayed at the bottom of the screen. Double clicking on the results listed will focus the editor on that instance of the search string. These searching utilities makes it easy to quickly locate anything in your project, so experiment with the search tool -- it can save you a lot of time later.

Interactions Pane

The interactions pane is part of the Dr. Java perspective and appears as a tab pane along with "Console". The interactions pane is basically a command interpreter that feeds Java code into a running JVM, which means you can use it to test a statement, or series of statements, in Java code.  The Dr. Java perspective allows you to practice different constructs of the language without having to write a full class.  For example, if you want to verify how perform String manipulation in Java, you could write the following statements in the Interactions Pane which will process the statements for you:

In addition to creating standard Java objects, you can also create instances of objects you've defined in your project. For example, let's say your project has a Foo class. After you compile your project, you can type Foo f = new Foo() in the interactions pane and experiment with your own code.

Sometimes, after you've declared a bunch of variables and played with them, you may want to reset the interactions pane so you can start from scratch. To do this, all you need to do is right click anywhere in the interactions pane and click "Reset Interactions", and you'll be given a fresh environment without any variables declared.

Be the first one to comment on this page.

  Eclipse eBooks

No eBooks on Eclipse could be found as of now.

 Eclipse FAQs
More Links » »
 Eclipse Interview Questions
More Links » »
 Eclipse Articles

No Eclipse Articles could be found as of now.

 Eclipse News

No News on Eclipse could be found as of now.

 Eclipse Jobs

No Eclipse Articles could be found as of now.

Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb


Keywords: Eclipse Other Topics, Eclipse Tutorial, Eclipse tutorial pdf, history of Eclipse, basic Eclipse, syntax use in Eclipse, Eclipse software download, learn Eclipse.

HTML Quizzes
CSS Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
XML Quizzes
XML Quiz
XSL Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright ? 2008. Academic All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World | Important Websites
Copyright ? 2003-2022 Vyom Technosoft Pvt. Ltd., All Rights Reserved.