Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problem with running Java code
Problem with running Java code [message #1803911] Wed, 13 March 2019 14:41 Go to next message
Uendi Hajderaj is currently offline Uendi HajderajFriend
Messages: 1
Registered: March 2019
Junior Member
I am trying to run a Java project about Complex numbers and until last week it worked perfectly fine and it did run. Now when I try to run it, it says 'Selection does not contain a main type', which I don't quite understand, because there is a main type.
  • Attachment: Complex.java
    (Size: 8.38KB, Downloaded 27 times)
Re: Problem with running Java code [message #1803942 is a reply to message #1803911] Thu, 14 March 2019 03:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30441
Registered: July 2009
Senior Member
Keep in mind that when you Run something, a Launch Configuration is created. You can look at those with Run -> Run Configurations..., so if you were able to run before, such a configuration will exist and you should be able to explicitly run it. In general JDT tries to be smart to choose an existing configuration depending on what's selected in the workbench, e.g., the active editor selection. Without seeing the state of your IDE, no one can tell you why JDT doesn't find a launch configuration for this, but if the active editor is a Java class that doesn't have a main method, you'd get the type of failure you describe...
Previous Topic:Graphical Transformation
Next Topic:Generated Windows are really small.
Goto Forum:
  


Current Time: Mon Sep 16 10:06:05 GMT 2019

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

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

Back to the top