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: 11
Registered: April 2016
Junior Member
I downloaded the zipped source code from http://horstmann.com/java8/index.html (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.
Thanks.

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: Tue Mar 19 05:04:04 GMT 2024

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

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

Back to the top