MyEclipse project is not displayed after importing items Facets

Source: Internet
Author: User

can find Project Facets

Importing eclipse from MyEclipse causes unrecognized Web project (Java Project to Web project)

1. Go to the project directory and locate the. project file, open.

2. Find the <natures>...</natures> code snippet.

3, in the 2nd step of the code snippet, add the following label content and save:

<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

4. Right-click on the Eclipse project to refresh the project.

5, right-click on the project, enter the property (properties)

6. Click on "Project Facets" in the list item on the left, select "Dynamic Web Module" and "Java" on the right and click Save.

Note: Additional troubleshooting path issues for custom settings Web directories:

Note that if you have 2 items to set up, please change them first. Project file before refreshing.

When you recently made a Web project, you created a new Web project, such asWebdemo, eclipse default build path is build, Web-inf stored under webcontent, changed a build path and webcontent name, found that the project is not available,

1. The specific modification process, the webcontent changed to WebRoot
2. Move the build path from build/classesChange to Webdemo/webroot/web-inf/classes

The jar packages that were stored in Lib before the changes were stored under the Libraries/web app Libraries directory of the Eclipse Project, and the Web app Libraries became empty after the change, and tomcat6.x was not recognized at boot time. Study the afternoon, finally find out the problem, today special sent out for later friends reference.

We open the project directory, under the root directory there is a. Settings\org.eclipse.wst.common.componentFile
When you create a new project, the following contents of this file are as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<project-modules id= "Modulecoreid" project-version= "1.5.0" >
<wb-module deploy-name= "Webdemo" >
<wb-resource deploy-path= "/" source-path= "/webcontent"/>
<wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/>
<property name= "Context-root" value= "Webdemo"/>
<property name= "Java-output-path" value= "/webdemo/build/classes"/>
</wb-module>
</project-modules>

After the change, I found a missing sentence.<wb-resource deploy-path= "/" source-path= "/webcontent"/>, so we have to add it manually, the final correction after the content is as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<project-modules id= "Modulecoreid" project-version= "1.5.0" >
<wb-module deploy-name= "Webdemo" >
<wb-resource deploy-path= "/" source-path= "/webroot"/>
<wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/>
<property name= "Context-root" value= "Webdemo"/>
<property name= "Java-output-path" value= "/webdemo/build/classes"/>
</wb-module>
</project-modules>

This allows our Eclipse Web project to run as before, and all the jars under the Lib package are automatically stored under the Libraries/web App libraries directory.

Project Facets not found

 

  

Generally appear in the import from elsewhere on the project, only the project folder has a red fork, other places are normal, now summarizes the individual's several solutions:

There are several possibilities:
1, the encoding settings are consistent, that is, your project's original encoding and now eclipse with the default encoding is consistent
2, the jar path in the import project may have been changed, in most cases this is the cause, and I have met, you have to make sure that your jar package path is not a problem. MyEclipse have a view of the jar path you can switch to see, the red X is the path has been changed, re-add in OK.
3, the problem console has the following error message: Java compiler level does not match the version of the installed Java project facet. This can typically be done right--->properties--> the project and then find project facets and Java compiler two options to modify the JDK version that they use. If you do not find the project facets option, you can refer to the following method:

When you installed two versions of the JDK, two IDE development tools were used, such as two myeclipse,myeclipse8.5 and Myeclipse9.0.

This time it involves the JDK version of the problem, and the settings in MyEclipse are relatively hidden.
There is a project in eclipse that has the error, because the Java version setting in Facted project is inconsistent with the Java version of the project. And if the use of MyEclipse, this configuration is not very convenient to modify, the specific method to say later. In the case of the Eclipse JEE version, the use of the Java EE plug-in is WTP, in the WTP environment, right-click on the current project, in the properties--project facets, the configuration of the compiled version is consistent with the Java compiler version, the problem is resolved.
There is no project facets configuration option in MyEclipse, you will need to find the Org.eclipse.wst.common.project.facet.core.xml file under the. Settings folder for the current project, which reads as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
<fixed facet= "Wst.jsdt.web"/>
<installed facet= "java" version= "1.6"/>
<installed facet= "Jst.web" version= "2.5"/>
<installed facet= "Wst.jsdt.web" version= "1.0"/>
</faceted-project>
where <installed facet= "java" version= "1.6"/> This line is the compilation level configuration of faceted project. <installed facet= "Jst.web" version= "2.5"/> This line of configuration also needs to be modified in some cases, such as building a Web project in MyEclipse and then importing it into Eclipse Jee, Sometimes it is necessary to modify this configuration.
After the configuration is saved, the problem is resolved after the project is refreshed and build.

MyEclipse project is not displayed after importing items Facets

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.