How to get your Netbeans project into Eclipse

后端 未结 6 1991
别跟我提以往
别跟我提以往 2020-12-01 04:46

I want to get my NetBeans project to Eclipse. It\'s a web application project.

I imported war files into Eclipse but I am not able to get the Java files and the war

相关标签:
6条回答
  • 2020-12-01 04:47

    You should be using Maven, as the structure is standardized. To do that (Once you have created your Maven project in Netbeans, just

    1. Go to File -> Import
    2. Open Maven tree node
    3. Select Existing Maven Project
    4. Browse to find your project from NetBeans
    5. Check Add project to Working Set
    6. Click finish.

    As long as the project has no errors, I usually get none transferring to eclipse. This works for Maven web projects and regular projects.

    0 讨论(0)
  • 2020-12-01 04:51

    In Eclipse:

    File>Import>General>Existing projects in Workspace

    Browse until get the netbeans project folder > Finish

    0 讨论(0)
  • 2020-12-01 05:05

    Sharing my experience, how to import simple Netbeans java project into Eclipse workspace. Please follow the following steps:

    1. Copy the Netbeans project folder into Eclipse workspace.
    2. Create .project file, inside the project folder at root level. Below code is the sample reference. Change your project name appropriately.

      <?xml version="1.0" encoding="UTF-8"?>
      <projectDescription>
          <name>PROJECT_NAME</name>
          <comment></comment>
          <projects>
          </projects>
          <buildSpec>
              <buildCommand>
                  <name>org.eclipse.jdt.core.javabuilder</name>
                  <arguments>
                  </arguments>
              </buildCommand>
          </buildSpec>
          <natures>
              <nature>org.eclipse.jdt.core.javanature</nature>
          </natures>
      </projectDescription>
      
    3. Now open Eclipse and follow the steps,

      File > import > Existing Projects into Workspace > Select root directory > Finish

    4. Now we need to correct the build path for proper compilation of src, by following these steps:

      Right Click on project folder > Properties > Java Build Path > Click Source tab > Add Folder

    (Add the correct src path from project and remove the incorrect ones). Find the image ref link how it looks.

    1. You are done. Let me know for any queries. Thanks.
    0 讨论(0)
  • 2020-12-01 05:08

    There's a very easy way if you were using a web application just follow this link.

    just do in eclipse :

    File > import > web > war file
    

    Then select the war file of your app :)) very easy !!

    0 讨论(0)
  • 2020-12-01 05:10
    1. Make sure you have sbt and run sbt eclipse from the project root directory.
    2. In eclipse, use File --> Import --> General --> Existing Projects into Workspace, selecting that same location, so that eclipse builds its project structure for the file structure having just been prepared by sbt.
    0 讨论(0)
  • 2020-12-01 05:11

    One other easy way of doing it would be as follows (if you have a simple NetBeans project and not using maven for example).

    1. In Eclipse, Go to File -> New -> Java Project
    2. Give a name for your project and click finish to create your project
    3. When the project is created find the source folder in NetBeans project, drag and drop all the source files from the NetBeans project to 'src' folder of your new created project in eclipse.
    4. Move the java source files to respective package (if required)
    5. Now you should be able to run your NetBeans project in Eclipse.
    0 讨论(0)
提交回复
热议问题