One Star

How to successfully rename java project via export/import?

Tried to rename a project via export to zip file, and then specifying a new name on import.
This appears to work at first but causes a run-time error (cannot find main class).
I have checked that all is well if the same name is used as before.
Is there a way of renaming a project successfully?
7 REPLIES
One Star

Re: How to successfully rename java project via export/import?

Try "switch project" and then import. Select the project you want to rename (just browse to the directory where the current project is) and give it a new name.
Seven Stars

Re: How to successfully rename java project via export/import?

How do you "specify a new name on import"? If you "import existing project as local" you should not have a problem.
One Star

Re: How to successfully rename java project via export/import?

I tried "switch project" but it just returns me to the dialog that opens TOS. If I then "browse to the directory where the current project is" and rename the directory, I get an empty project list with the error message "A project is needed".
I tried specifying a new name on import by entering my new name in the "Project name" field of the "Import project as" dialog window. This gives me a new project but it won't run any jobs because the old project name still appears in the Java class names which cannot be found at run-time.
So I'm still stuck here.
Seven Stars

Re: How to successfully rename java project via export/import?

What version of Talend are you using? I have no problem with "import existing project as local" in v5.1.1.
Alternatively, "create a new local project" with the name you want, open it and then click on the "import items" icon to import everything from the export.
You cannot, as you discovered, just change the project's folder name.
One Star

Re: How to successfully rename java project via export/import?

I'm on 4.2.3. Just to clarify, "import existing project as local" gives me the option to supply a new project name on import, but I get run-time errors after that because the internal Java class names are un-altered.
Seven Stars

Re: How to successfully rename java project via export/import?

I'm afraid I have no problems with "import existing project as local" even in v4.2.3. Have you tried the alternative I suggested?
One Star

Re: How to successfully rename java project via export/import?

This is what working for me:
I clicked on switched product, Then on project selection screen, i choose Import local project.
This result in new project creation, I choose the new name and select the the old project folder location.