Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Import
Import [message #148815] Sat, 15 April 2006 13:44 Go to next message
Eclipse UserFriend
Originally posted by: dragman.siol.com

Hello

I don't know how to import a project made from my teacher into eclipse
3.2.1

I need to import a project with files from
http://kepa.fri.uni-lj.si/edu/op2/primeri.zip

Tnx
Re: Import [message #148916 is a reply to message #148815] Sun, 16 April 2006 22:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: csae7511.uibk.ac.at

Try
File -> Import ...

HTH,
Stefan

Dejan schrieb:
> Hello
>
> I don't know how to import a project made from my teacher into eclipse
> 3.2.1
>
> I need to import a project with files from
> http://kepa.fri.uni-lj.si/edu/op2/primeri.zip
>
> Tnx
>
Re: Import [message #149052 is a reply to message #148815] Mon, 17 April 2006 21:02 Go to previous message
Chris Gage is currently offline Chris GageFriend
Messages: 74
Registered: July 2009
Member
I would do it a little differently...

The zip file is not in a very eclipse-friendly format, but you can fix that.

Create a new Java project and unzip all of the files in the the zip file
directly into it. Rightmousebutton (RMB) > refresh on the project to
see what you get.

You will now have a set of packages called Eclipse.something and one
called just Eclipse. It probably isn't a good idea to have packages
called Eclipse or Eclipse.something in your project, you might confuse
people down the road.

Also the file contents do not match these package names, so first of all
you can just refactor the package names to match what is in the files,
by doing the following on each package name:
select the package, then RMB > Refactor > Rename
delete the "Eclipse." part from the name
click ok

Java doesn't like package names with uppercase letters so it will give
you a warning about that, you can fix that manually later. You also
have main() procedures in some of these files, so the refactoring will
give you warnings about that, but hopefully no actual errors.

Click on Continue to accept the warnings for the moment.

You may have some residual compile errors to resolve.

The Java files in the package called Eclipse do not contain a package
statement, so you'll have to edit each of them by hand, and add the
following line at the top of each file:

package Eclipse;

Now you should go back and refactor the package names to be all
lower-case. Just select each package in turn in the Package Explorer,
and RMB > Refactor > Rename and edit as you think fit, and rename the
package called Eclipse to something else. Click OK.

The package declarations inside the files will get updated automatically
for you in the process.

The applets and some of the other java files implement serializable so
you need to add the following line to each of them just after the first
{ of the class to suppress a warning:

static final long serialVersionUID = 1234567;

You're good to go at this point.

Chris
Previous Topic:Newcomer
Next Topic:How to read javadoc documentation from Eclipse?
Goto Forum:
  


Current Time: Sat Apr 27 02:15:32 GMT 2024

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

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

Back to the top