4

The build path option is not available when I right clicked on one of the the jars I wanted to include. Anybody knows why? Thanks! The Eclipse version I am using is
Eclipse SDK Version: 3.7.1 Build id: M20110909-1335
enter image description here

sammiwei
  • 3,140
  • 9
  • 41
  • 53

7 Answers7

15
  1. Right click on the Project and select properties. 2.Project facets --> java --> Apply
user8297907
  • 151
  • 1
  • 2
6

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>
Srini
  • 61
  • 1
  • 2
6

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.

Baldrick
  • 23,882
  • 6
  • 74
  • 79
3

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

This should fix the issue.

Loy Alvares
  • 99
  • 1
  • 2
0

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>
-1

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

mister270
  • 366
  • 1
  • 15
-1

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

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

enter image description here

enter image description here

monkSinha
  • 341
  • 3
  • 10