Eclipse Build Path not available

99封情书 提交于 2019-12-05 22:35:46

Right click on the project, choose 'Properties'. In 'Java Build path', go to the 'Libraries' tab, and click on 'add JARs' to include jar of the workspace in the build path of your Java project.

  1. Right click on the Project and select properties. 2.Project facets --> java --> Apply

Make sure u have all the below, 1) settings folder 2) .classpath 3) .project Just copy this and paste .project file, clean and build it,

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>XXXX</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>

In the Toolbar Menu, click on "Window->Show View->Package Explorer.

This should fix the issue.

Go To Your Project Workspace=>inside in Project root Folder.You will see .project file Open that and replace with it.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>Test</name>
    <comment></comment>
    <projects>
        </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.maven.ide.eclipse.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.maven.ide.eclipse.maven2Nature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
    </natures>
</projectDescription>

Don't know the reason. But this works for me, so posting it.

Right-click on the project -> 'Properties' -> 'Java Build Path'

If you are using an osgi run configuration, Run -> Run Configurations... Select you laucher and click on the Bundles tab. Filter with org.eclipse.swt and make sure that the org.eclipse.swt and org.eclipse.swt.[arch].[version].jar are checked.

This drove me nuts until I did this simple thing. If you validate bundles without having checked these you'll get a "No Problems" dialog but you'll get this error at run time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!