Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to import exsist java package into Eclipse?

Reply
Thread Tools

How to import exsist java package into Eclipse?

 
 
Hongyu
Guest
Posts: n/a
 
      07-29-2008
Hi,

I am new to Java and Eclipse. I got some java source code in a zip
file, so i unzipped them. After unzipping, those source code located
in different directories which are for different packages. I tried to
import them into Eclipse after I created a new package, but I saw a
lot of errors in Eclipse. The original source code has some package
names, so should I import them into same directories as those
indicated by the original package names, but I didn't know how? I have
tried to search Internet but failed to find similar problems and
soluations.

Any help will be greatly appriated.

Hongyu
 
Reply With Quote
 
 
 
 
Hongyu
Guest
Posts: n/a
 
      07-29-2008
On Jul 29, 6:00 pm, Hongyu <(E-Mail Removed)> wrote:
> Hi,
>
> I am new to Java and Eclipse. I got some java source code in a zip
> file, so i unzipped them. After unzipping, those source code located
> in different directories which are for different packages. I tried to
> import them into Eclipse after I created a new package, but I saw a
> lot of errors in Eclipse. The original source code has some package
> names, so should I import them into same directories as those
> indicated by the original package names, but I didn't know how? I have
> tried to search Internet but failed to find similar problems and
> soluations.
>
> Any help will be greatly appriated.
>
> Hongyu


More actually, the exist package are source code
including .java, .jar, .form etc.
 
Reply With Quote
 
 
 
 
Alex.From.Ohio.Java@gmail.com
Guest
Posts: n/a
 
      07-29-2008
On Jul 29, 5:00 pm, Hongyu <(E-Mail Removed)> wrote:
> Hi,
>
> I am new to Java and Eclipse. I got some java source code in a zip
> file, so i unzipped them. After unzipping, those source code located
> in different directories which are for different packages. I tried to
> import them into Eclipse after I created a new package, but I saw a
> lot of errors in Eclipse. The original source code has some package
> names, so should I import them into same directories as those
> indicated by the original package names, but I didn't know how? I have
> tried to search Internet but failed to find similar problems and
> soluations.
>
> Any help will be greatly appriated.
>
> Hongyu


Easiest way is drag&drop source folder from your file directory to
Eclipse project.

Let's say you have your sources at c:\tmp\something\source
like class abc.xyz.Test in c:\tmp\something\source\abc\xyz\Test.java

So, root for all packages is c:\tmp\something\source

And, inside Eclipse you have project like MyProject.
Probably you have dirs MyProject\src and MyProject\bin.

So, select all files inside c:\tmp\something\source and drag&drop then
to MyProject\src.

Import is done.

As for jar file - drag them to the project directory (optionally) and
then include them to the Java Build Path in the project inside
Eclipse.

Alex.
http://www.myjavaserver.com/~alexfromohio/
 
Reply With Quote
 
Hongyu
Guest
Posts: n/a
 
      07-30-2008
On Jul 29, 6:21*pm, (E-Mail Removed) wrote:
> On Jul 29, 5:00 pm, Hongyu <(E-Mail Removed)> wrote:
>
> > Hi,

>
> > I am new to Java and Eclipse. I got some java source code in a zip
> > file, so i unzipped them. After unzipping, those source code located
> > in different directories which are for different packages. I tried to
> > import them into Eclipse after I created a new package, but I saw a
> > lot of errors in Eclipse. The original source code has some package
> > names, so should I import them into same directories as those
> > indicated by the original package names, but I didn't know how? I have
> > tried to search Internet but failed to find similar problems and
> > soluations.

>
> > Any help will be greatly appriated.

>
> > Hongyu

>
> Easiest way is drag&drop source folder from your file directory to
> Eclipse project.
>
> Let's say you have your sources at c:\tmp\something\source
> like class abc.xyz.Test in c:\tmp\something\source\abc\xyz\Test.java
>
> So, root for all packages is c:\tmp\something\source
>
> And, inside Eclipse you have project like MyProject.
> Probably you have dirs MyProject\src and MyProject\bin.
>
> So, select all files inside c:\tmp\something\source and drag&drop then
> to MyProject\src.
>
> Import is done.
>
> As for jar file - drag them to the project directory (optionally) and
> then include them to the Java Build Path in the project inside
> Eclipse.
>
> Alex.http://www.myjavaserver.com/~alexfromohio/


Thanks a lot for the help, Alex. I will try them tomorrow since I
don't have my computer with Eclipse and source code here.
 
Reply With Quote
 
Hongyu
Guest
Posts: n/a
 
      07-30-2008
On Jul 29, 6:21*pm, (E-Mail Removed) wrote:
> On Jul 29, 5:00 pm, Hongyu <(E-Mail Removed)> wrote:
>
> > Hi,

>
> > I am new to Java and Eclipse. I got some java source code in a zip
> > file, so i unzipped them. After unzipping, those source code located
> > in different directories which are for different packages. I tried to
> > import them into Eclipse after I created a new package, but I saw a
> > lot of errors in Eclipse. The original source code has some package
> > names, so should I import them into same directories as those
> > indicated by the original package names, but I didn't know how? I have
> > tried to search Internet but failed to find similar problems and
> > soluations.

>
> > Any help will be greatly appriated.

>
> > Hongyu

>
> Easiest way is drag&drop source folder from your file directory to
> Eclipse project.
>
> Let's say you have your sources at c:\tmp\something\source
> like class abc.xyz.Test in c:\tmp\something\source\abc\xyz\Test.java
>
> So, root for all packages is c:\tmp\something\source
>
> And, inside Eclipse you have project like MyProject.
> Probably you have dirs MyProject\src and MyProject\bin.
>
> So, select all files inside c:\tmp\something\source and drag&drop then
> to MyProject\src.
>
> Import is done.
>
> As for jar file - drag them to the project directory (optionally) and
> then include them to the Java Build Path in the project inside
> Eclipse.
>
> Alex.http://www.myjavaserver.com/~alexfromohio/


It worked! Thanks a lot for the help again.

Have a great day!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
if exsist hash key.. why not finding it??? jason@cyberpine.com Perl Misc 4 09-07-2006 04:40 PM
Do DVD+R DL Lightscribe exsist? M a J Computer Information 0 08-31-2006 12:18 PM
take hostname, look if folder exsist, if not create and copy files Paw ASP General 8 05-31-2006 02:09 PM
Does a programme exsist that............................ osiris.luxor@btopenworld.com Computer Support 6 12-09-2004 03:17 AM



Advertisments