Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting packages to work with Ecilpse

Posted on 2003-12-03
4
Medium Priority
?
903 Views
Last Modified: 2008-02-01
I just recently downloaded the free IDE, Eclipse, and it is great and all, but i am having a lot of troble importing any packages into any of my java programs [I only am trying to use KeyboardReader, Turtle Graphics, and BreezySwing packages from this site www.wlu.edu/~lambertk/hsjava]. From what i can see my program reconizes that the packages exist because whenever i put in any of there names, they turn into a light blue. However, I think that when I put in the import statment [such as import KeyboardReader.*] Eclipe actualyl thinks the import statement is the "public class [put your own name here] { statement" folowing the import statemnt because i always get the dreaded "cannot find main" error in the JVM. The bigger reason why i think this could be true is because when i take away the impor statemtn and anything related with the import statement in the program, the program mysteriously works! if anyone can tell me in a step to step way on how to get packages to work with Eclipse, it would be greatly apprieated.
0
Comment
Question by:Supergoldzero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:savalou
ID: 9869987
To use third-party jars in Eclipse you need to add them to the project classpath.  In the menu go to Project->Properties and in the Properties window click on "Java Build Path" then Libraries and "Add Jars".  Is that what you did?
0
 
LVL 92

Expert Comment

by:objects
ID: 9869996
Have you added the new jar to Eclipse?
0
 

Author Comment

by:Supergoldzero
ID: 9872210
Yeah, that is what i actually did, but it still does not work for some odd reason
0
 
LVL 3

Accepted Solution

by:
savalou earned 540 total points
ID: 9872601
So you did
import KeyboardReader.*;

???
It should be
import TerminalIO.KeyboardReader;

And unless you have the jars in the project directory, I think you need to do "Add External Jars" in the project properties settings.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question