Does Not Contain A Main Type Java Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or editor does not contain a main type java posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss editor does not contain a main type java eclipse Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only
Selection Does Not Contain A Main Type Java
takes a minute: Sign up Error: Selection does not contain a main type up vote 20 down vote favorite 5 I am trying to run some java files in a new project. So I make the project, put the files
Editor Does Not Contain A Main Type Eclipse Launch Error
in it and I try to run the main file so my game starts. I get an error that says selection does not contain a main type. I have tried several ways to run it: Some say to launch eclipse again, tried this a dozen times. Somewhere else someone pointed to open a new project and make a build path to the old project. Didn't work either. I am pretty sure it must work because I ran it a few hours selection does not contain a main type error in eclipse ago at school. How do I get this working? Thank you in advance! java eclipse project startup startup-error share|improve this question edited Sep 30 '14 at 5:44 jww 35.3k21110222 asked Apr 25 '13 at 21:38 user2321611 1841112 11 Do you have a public static void main(String[] args) anywhere? –Emrakul Apr 25 '13 at 21:40 I do have public class "name" extends JFrame –user2321611 Apr 25 '13 at 21:43 6 You should maybe answer Telthiens question :) –Anders Lindén Apr 25 '13 at 21:44 And I do have a dog, but please read again what Telthien said. –Asier Aranbarri Apr 25 '13 at 21:51 1 I think all the probes point that he's trying to run some classes without a main method. We'll continue investigating. –Asier Aranbarri Apr 25 '13 at 21:55 | show 1 more comment 12 Answers 12 active oldest votes up vote 17 down vote accepted Hope you are trying to run the main class in this way see screen shot: If no then try this way and if yes then please make sure that your class you are going to run have main method i-e public static void main(String[] args){ // some code here} same definition. Hope this will help you. share|improve this answer answered Apr 26 '13 at 6:47 NoNaMe 3,515174577 add a comment| up vote 28 down vote The other answers are all valid, however, if you are sti
here for a
Selection Does Not Contain A Main Type Eclipse Maven
quick overview of the site Help Center Detailed answers spring boot selection does not contain a main type to any questions you might have Meta Discuss the workings and policies eclipse launch error 13 of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads http://stackoverflow.com/questions/16225177/error-selection-does-not-contain-a-main-type with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: http://stackoverflow.com/questions/17233226/selection-does-not-contain-a-main-type-eclipse-run-error Sign up “Selection does not contain a main Type” - Eclipse Run Error up vote 0 down vote favorite I made a sample code to start one project just refactoring another one. This the refactored one: package com.sh.st; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.SwingConstants; public class Main extends JFrame implements ActionListener { /** * */ JMenuBar bar; JMenu file, register; JMenuItem close, search; ImageIcon figure1= new ImageIcon("C:/Users/Victor/Downloads/Untitled.jpg"); //ImageIcon figure2= new ImageIcon("C:/Victor Rocha/carroicon.jpg"); JLabel Ibimagem1,Ibimagem2; /** * */ public Main() { bar= new JMenuBar(); file= new JMenu("file"); register= new JMenu("register"); register.setMnemonic(KeyEvent.VK_R); file.setMnemonic(KeyEvent.VK_F); close= new JMenuItem("Close"); close.addActionListener(this); search= new JMenuItem("Search"); search.addActionListener(this); Ibimagem1= new JLabel(figure1, JL
Things LocationTech Long-Term Support PolarSys Science OpenMDM More Community Marketplace Events Planet Eclipse Newsletter Videos Participate Report a Bug Forums Mailing Lists Wiki IRC How to Contribute https://www.eclipse.org/forums/index.php/t/487744/ Working Groups Automotive Internet of Things LocationTech Long-Term Support PolarSys Science OpenMDM Toggle navigation Home Projects Forums Eclipse Community Forums Forum Search: Search Help Register Login Home Home» Newcomers» Newcomers» "Selection does not contain a main type" error Show: Today's Messages :: Show Polls :: Message Navigator "Selection does not contain a main type" does not error [message #1059501] Mon, 20 May 2013 03:25 Jared BeckhamMessages: 1Registered: May 2013 Junior Member Hey guys, so I think this is a pretty common error from searching through the forums, but it seems like everyone has it for a different reason and I can't quite make sense of some of the solutions. Basically I'm working through a java does not contain textbook and I had eclipse working perfectly for the past 2 weeks or so but I started it up today and can't get anything to run. Before, when it was working, I could just hit ctrl+F11 and it would run the program, but now it prompts me to select a java applet or java application when I try to run my programs, and neither option successfully runs the program. Attached is an image of my setup with my code and the error. How can I get eclipse to run my programs again? Thanks! Attachment: eclipseerror.jpg (Size: 198.38KB, Downloaded 5679 times) Report message to a moderator Re: "Selection does not contain a main type" error [message #1059760 is a reply to message #1059501] Tue, 21 May 2013 14:28 Nitin DahyabhaiMessages: 2733Registered: July 2009 Senior Member Java is a case sensitive language. Your "main" method name has to be lowercase. Report message to a moderator Re: "Selection does not contain a main type" error [message #1085515 is a reply to message #105