How to create a project from existing source in Eclipse and then find it?

前端 未结 11 1859
难免孤独
难免孤独 2020-11-28 01:50

I have created several .java files. All of them are located in one directory. I used a text editor to write these files. Now I want to switch to Eclipse. How can I do it? I

11条回答
  •  时光说笑
    2020-11-28 02:18

    This answer is going to be for the question

    How to create a new eclipse project and add a folder or a new package into the project, or how to build a new project for existing java files.

    1. Create a new project from the menu File->New-> Java Project
    2. If you are going to add a new pakcage, then create the same package name here by File->New-> Package
    3. Click the name of the package in project navigator, and right click, and import... Import->General->File system (choose your file or package)

    this worked for me I hope it helps others. Thank you.

提交回复
热议问题