-4

I need to change the package to Eclipse.

Now my package looks like this:

test
    java
        helloword

But I want to change it on it:

java
    helloword

How can I do that?

John Doe
  • 101
  • 1
  • 5
  • 1
    This has already been answered in the past: https://stackoverflow.com/a/10161882/2350479 – Deconimus Mar 06 '18 at 11:31
  • 3
    Possible duplicate of [Eclipse: change name of existing package with classes inside](https://stackoverflow.com/questions/10161840/eclipse-change-name-of-existing-package-with-classes-inside) – ZF007 Mar 06 '18 at 11:38

2 Answers2

2

This is quite simple:

  1. Select the package you want to change

  2. Press F2

  3. Enter the new package name

congard
  • 945
  • 2
  • 10
  • 28
1
  1. Select the package you want to rename.
  2. Select Refactor.
  3. Click on rename
  4. Type new name. There u go...
Sonakshi
  • 11
  • 1