Results 1 to 4 of 4
  1. #1
    shin777 is offline Member
    Join Date
    May 2013
    Posts
    43
    Rep Power
    0

    Default Why do I get no main methods, applets, or midlets found in file error?

    Why do I get no main methods, applets, or midlets found in file error?-14xhxx.jpg

    These are code but I keep getting no main methods, applets, or midlets found in file error. What am I doing wrong? I did exactly same as what my teacher showed me
    in class but it just doesn't work. Also what does he mean by draw football field only using - _ | marks? I drew one only using those characters but it gave me error message
    although it still runs program when i execute it. Help will be appreciated. thank you. :)
    I am using Java Platform (JDK) 7u21 and file is in .java format.



    Here are instruction of this project

    Note: On this and all future assignments you can only use techniques that have been discussed in class to this point. That said, if it was not presented in chapter 1, 2.1, or 2.2 you should not use it on this assignment or it will be marked down.

    Write an application named Project1 to produce the following output in the console window:
    MSU - - Get Anywhere From Here
    (You MUST use two java statements to create that one line of output. Make sure that your output is identical to what you see above. There is one space before and after each hyphen. Be consciences about capital letters)

    On the next line of console output print the following:
    My name is <insert your first and last name here>
    (You will replace the greater then sign, less then sign, and the words within them with your own first and last name

    Now skip two lines in your console output:

    Using the next fifteen lines of console output to draw a football field:

    The only three characters that you can use are the pipe (the key above the Enter), the hyphen, and underscore. You determine how many spaces should be used to represent 10 yards. Remember that the endzone is always 10 yards deep. So the entire length of the field is 120 yards. You don’t need to include hash marks or any writing on the field, but if you are bored go for it (no extra points, though). Don’t forget the goal posts. Those are important! The entire field (including goal posts) should stretch across the entire width of the console window but should not extend past. In other words, I should not have to vertically scroll to see the entire thing.

    At the top of the application source code place a block comment as follows:
    /*Programmer name: <your name>
    Project name: Project 1
    Course, Day and time: CIS1500, <day and time of your section>
    Date of completion: <data you completed>
    Purpose: <a sentence summarizing what the class/application does>
    */

    This type of block comment MUST be on top of each project you submit.
    In class assignments require the program name and your first and last name as single comments.
    Last edited by shin777; 05-22-2013 at 12:00 AM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: Why do I get no main methods, applets, or midlets found in file error?

    What are you doing to get that error?
    What command are you running?
    What's the name of the file the above code is stored in?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    shin777 is offline Member
    Join Date
    May 2013
    Posts
    43
    Rep Power
    0

    Default Re: Why do I get no main methods, applets, or midlets found in file error?

    Quote Originally Posted by Tolls View Post
    What are you doing to get that error?
    What command are you running?
    What's the name of the file the above code is stored in?

    I am using Java Platform (JDK) 7u21. I am trying to make it say

    MSU -- Get Anywhere from Here
    My Name is John Smith


    when I run it. It's stored in .java file. I see it didn't show space created by tab button. Here is screenshot of exact program I wrote for this. :(
    my teacher told me I have to draw football field using print and println method with using only - _ | keys. Thanks.

    Why do I get no main methods, applets, or midlets found in file error?-14xhxx.jpg
    Last edited by shin777; 05-22-2013 at 12:16 AM.

  4. #4
    shin777 is offline Member
    Join Date
    May 2013
    Posts
    43
    Rep Power
    0

    Default Re: Why do I get no main methods, applets, or midlets found in file error?

    Hmm.. never mind. figured out why. :)

Similar Threads

  1. Replies: 8
    Last Post: 11-22-2012, 08:16 AM
  2. main method not found error in class . wat s the error?
    By kirankumaragnihotram in forum New To Java
    Replies: 10
    Last Post: 06-29-2012, 12:26 PM
  3. Replies: 0
    Last Post: 04-01-2012, 07:16 AM
  4. <No main classes found> Error
    By hersman in forum NetBeans
    Replies: 2
    Last Post: 04-23-2011, 02:08 AM
  5. No main class found error
    By jhering1986 in forum New To Java
    Replies: 17
    Last Post: 03-28-2009, 03:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •