Importing files into Eclipse [message #771296] |
Mon, 26 December 2011 17:41  |
Eclipse User |
|
|
|
Hi guys,
My friend sent me some code that he wanted me to look at. How do I import the folder into my workspace? (It contains the main folder, which has multiple subfolders before reaching the actual source files.)
I can bring it into my workspace, but when I run the main method from some of his methods, Eclipse complains that "Editor does not contain a main type." (My form of importing was moving the folder to where my workspace is contained and refreshing the project. I don't know how to tell Eclipse to use these files properly.)
As always, any help would be greatly appreciated!
|
|
|
Re: Importing files into Eclipse [message #771308 is a reply to message #771296] |
Mon, 26 December 2011 18:22  |
Eclipse User |
|
|
|
On 12/26/2011 04:41 PM, Sal! wrote:
> Hi guys,
>
> My friend sent me some code that he wanted me to look at. How do I
> import the folder into my workspace? (It contains the main folder, which
> has multiple subfolders before reaching the actual source files.)
>
> I can bring it into my workspace, but when I run the main method from
> some of his methods, Eclipse complains that "Editor does not contain a
> main type." (My form of importing was moving the folder to where my
> workspace is contained and refreshing the project. I don't know how to
> tell Eclipse to use these files properly.)
>
> As always, any help would be greatly appreciated!
You import files into Eclipse using the File->Import menu option. If
you are importing a file use the File System option. If you are
importing from an archive (zip) file, use the Archive File option.
The Editor does not contain a main type is an indication that your are
invoking the Run as ... Java Application from a file that doesn't have a
main method. You need to select the class file that has the main method
prior to invoking Run as... Java Application.
|
|
|
Powered by
FUDForum. Page generated in 0.08017 seconds