Eclipse: editor does not contain a main type java

Problem:
Eclipse give “editor does not contain a main type” error when you start a class with contain a valid main method.

I know if I enable Maven dependency, that Eclipse will not be able to find the main method. Is it possible to take a class out of the classpath (java.build.path) if it is in the default directory?

Solution:
I had the same problem, I have to add that file to build path. after adding that file to build path. It worked fine. Go to package explorer –> build –> Add to build path || Include. This will solve the issue

Make eclipse Galileo 3.5 work with a NTMLv2 Proxy

I installed eclipse 3.5 at my work place (where we access internet through an authenticated NTML proxy). I was unable to make eclipse pass through this proxy, which prevented me to install updates and additional software.

Anthony Dahanne’s describes the workaround on his blog (in french). The Apache httpclient implementation should be disabled because it doesn’t work well with NTMLv2 proxies.

For NTLMv2 Proxies, that require user name and password for access the workaround is to

1. Disable the ECF httpclient provider.
2. Provide the NTLMv2 proxy authentication info (proxyhost, domain, username, and password)

In practice, edit your eclipse.ini file to append the following properties.

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=myproxy
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1