Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » New to Eclipse IDE and Java and I have a very basic question
New to Eclipse IDE and Java and I have a very basic question [message #1060481] Sat, 25 May 2013 07:14 Go to next message
Andre Eskandari is currently offline Andre EskandariFriend
Messages: 1
Registered: May 2013
Junior Member
In the package explorer view I have:

lessons (java project)
src (source folder)
lessons (package)
lesson1.java (file)



I am trying to run:


public class lessons
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}


But I recieve this message in the console view:

"Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at lessons.lesson1.main(lesson1.java:3)"

How am I supposed to sort/name the files and directory for this to work?
Re: New to Eclipse IDE and Java and I have a very basic question [message #1060493 is a reply to message #1060481] Sat, 25 May 2013 11:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Andre,

Comments below.

On 25/05/2013 1:15 PM, Andre Eskandari wrote:
> In the package explorer view I have:
>
> lessons (java project)
> src (source folder)
> lessons (package)
> lesson1.java (file)
>
>
>
> I am trying to run:
>
>
Above you say you have lessen1.java but here that's not what you show.
> public class lessons
It's a bad idea to not follow Java naming conventions, i.e., a class
name should start with an upper case letter.
> {
> public static void main(String[] args)
> {
> System.out.println("Hello World");
> }
> }
>
>
> But I recieve this message in the console view:
>
> "Exception in thread "main" java.lang.Error: Unresolved compilation
> problem:
> at lessons.lesson1.main(lesson1.java:3)"
This generally suggests you have a compile error in your project. You
should see a red "x" marker in the source view in that case.
>
> How am I supposed to sort/name the files and directory for this to work?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic: Project Explorer icon I.D.
Next Topic:Outline view uses red square for some icons
Goto Forum:
  


Current Time: Sat Apr 20 02:52:26 GMT 2024

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

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

Back to the top