Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Import java source code got errors "Editor does not contain a main type"(How to import java source code?)
Import java source code got errors "Editor does not contain a main type" [message #1787491] Sat, 26 May 2018 15:30
Albert Kao is currently offline Albert KaoFriend
Messages: 4
Registered: April 2016
Junior Member
I downloaded the zipped source code from (the book Java SE 8 for the Really Impatient by Cay Horstmann).
I created a Java project. (File, New, Java Project).

then I tried different ways to import java source code
- Import, General, Archive File
- unzip the downloaded source code, then Import, File System

but got errors such as:
- Editor does not contain a main type
- The declared package "" does not match the expected package "sec01"

I can fix these errors one by one, but I like to konw whether there is a proper way to import java source code from a zipped file to prevent these errors to occur.
Please help.

I use Eclipse Java EE IDE for Web Developers.
Version: Oxygen.3 Release (4.7.3)
Build id: 20180308-1800

[Updated on: Wed, 30 May 2018 10:53]

Report message to a moderator

Previous Topic:Java 10 and Swing Design View
Next Topic:SWT- ScrolledComposite Scrollbar issue
Goto Forum:

Current Time: Wed Sep 18 14:04:18 GMT 2019

Powered by FUDForum. Page generated in 0.02825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top