John
John

Reputation:

How to copy projects in Eclipse

When I copy the project in Eclipse, then a new project is copied named

copy of project

Now when I run it, then the URL bar still says the old project name in title.

Where is the reference stored so that I can run using new project name?

Upvotes: 0

Views: 3696

Answers (3)

Konstantin Komissarchik
Konstantin Komissarchik

Reputation: 29139

I believe you are referring to a copying a web project and the URL corresponds to the context root of the web app. You can change it at Project Properties -> Web Project Settings -> Context Root.

Upvotes: 0

Andreas Dolk
Andreas Dolk

Reputation: 114757

The projects name is written in the .project file inside the project folder:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>project-name</name>
    <!-- ... -->
</projectDescription>

Open that file with any text editor or from inside eclipse (you'll see it if you switch to Navigator View)

Upvotes: 4

Daniel
Daniel

Reputation: 28074

You have to copy the whole project tree, ad then you need to open the ".project" file in the copy. Replace the project name at the top of the xml file, and then you can reimport it.

You also have to copy/edit the launch configurations. You can find them in the workspace directory (search for *.launch files), and edit them.

Upvotes: 1

Related Questions