Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: "Editor dose not contain main type" error while running a simple application in Eclipse platform(IDE)

  1. #1
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default "Editor dose not contain main type" error while running a simple application in Eclipse platform(IDE)

    i getting used to Eclipse platform(IDE)
    i cant run a simple application
    it says..
    > "Editor does not contain main type"

    what am i suppsoed to do here?

    tnx a lot!


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Wink Re: nid some quick response here pls.!!!

    Quote Originally Posted by chronoz13 View Post
    i getting used to Eclipse platform(IDE)
    i cant run a simple application
    it says..
    > "Editor does not contain main type"

    what am i suppsoed to do here?

    tnx a lot!
    Hello chronoz13,

    Glad you are giving Eclipse a try

    I think you are getting this error message because your code does not contain the main method?

    public static void main (String[] args){
    //code here..
    }
    Try including the main method and let me know what happens.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default Re: nid some quick response here pls.!!!

    selection does not contain a main type ... T_T.

  4. #4
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default Re: nid some quick response here pls.!!!

    ahh i got it sir java. i just tying to use it like JCreator
    even i didnt declared a package . i can mange to run it by just simply declaring public static void main
    then System.ou.print..so on..

    its not as easy a JCreator..
    hmm got a little trouble here ahaha
    anyway i can still run a simple application..ahaha

    i think i should go out first with JCreator.. ahaha eclipse is really complicated.. but i know someday ill be using Eclipse too.
    i have school mates thats using the same IDE like eclipse..

    i just need to use JCreator first.. to get familliar with basics... T_T,
    Last edited by chronoz13; April 13th, 2009 at 07:33 AM.

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: nid some quick response here pls.!!!

    Quote Originally Posted by chronoz13 View Post
    ahh i got it sir java. i just tying to use it like JCreator
    even i didnt declared a package . i can mange to run it by just simply declaring public static void main
    then System.ou.print..so on..

    its not as easy a JCreator..
    hmm got a little trouble here ahaha
    anyway i can still run a simple application..ahaha

    i think i should go out first with JCreator.. ahaha eclipse is really complicated.. but i know someday ill be using Eclipse too.
    i have school mates thats using the same IDE like eclipse..

    i just need to use JCreator first.. to get familliar with basics... T_T,
    Eclipse has really good error handling and debugging features. You will notice that when Eclipse doesn't like something, a red line will appear under the code. Hold your mouse over it and a box will popup telling you the error aswell as suggestions for fixing it.

    Go with whatever IDE feels best for you.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  6. #6
    Java kindergarten chronoz13's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    659
    Thanks
    177
    Thanked 30 Times in 28 Posts

    Default Re: nid some quick response here pls.!!!

    tnx sir java.. anyways about eclipse ... what does "package" means?
    coz i never use to encounter it in JCreator.. specially in making a simple application such as "hello world" app.

  7. #7
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: nid some quick response here pls.!!!

    A package is basically the location of your current Java classes.

    You create packages so you can keep all your projects nice and tidy. You do not have to declare a package though as you can use the default package. This places all your projects in the same directory.

    All you need to do is give your package a name and add your classes to the package. Its very simple, especially after you do it a couple of times.

    Did you read that tutorial link I sent you? If you follow it exactly you will be able to create a simple 'Hello World' application easily.

    http://www.javaprogrammingforums.com...plication.html


    I know you think Eclipse is a lot more complicated than JCreator but it really isnt. Its like anything - Once you do it a few times it becomes second nature
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. [SOLVED] Java for loop problem and out put is not coming
    By thewonderdude in forum Loops & Control Statements
    Replies: 9
    Last Post: March 15th, 2009, 02:31 PM
  2. SOAP Message Factory response error
    By Buglish in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: November 6th, 2008, 01:42 PM