Skip to main content



      Home
Home » Newcomers » Newcomers » trying to run - first time(no main type found)
trying to run - first time [message #789359] Thu, 02 February 2012 17:30 Go to next message
Eclipse UserFriend
When running a program (OurKarelProgram) or another one, a message dialog pops: "Workspace does not contain a main type (do you have a public void run() method?"

Mac OSX 10.7.2
Eclipse 3.6

Ideas?

Thanks,
Yoel


Here is the code:

/*************************************************
* File: OurKarelProgram.java
*
* A simple Karel program where Karel picks up a
* beeper and carries it up a hill.
*/

import stanford.karel.*;

public class OurKarelProgram extends Karel {
public void run() {
move();
pickBeeper();
move();
turnLeft();
move();
turnLeft();
turnLeft();
turnLeft();
move();
putBeeper();
move();
}
}

Re: trying to run - first time [message #789388 is a reply to message #789359] Thu, 02 February 2012 18:20 Go to previous messageGo to next message
Eclipse UserFriend
On 2/2/2012 3:30 PM, Yoel Frischoff wrote:
> When running a program (OurKarelProgram) or another one, a message
> dialog pops: "Workspace does not contain a main type (do you have a
> public void run() method?"
>
> Mac OSX 10.7.2
> Eclipse 3.6
>
> Ideas?
>
> Thanks, Yoel
>
>
> Here is the code:
>
> /*************************************************
> * File: OurKarelProgram.java
> *
> * A simple Karel program where Karel picks up a
> * beeper and carries it up a hill.
> */
>
> import stanford.karel.*;
>
> public class OurKarelProgram extends Karel {
> public void run() {
> move();
> pickBeeper();
> move();
> turnLeft();
> move();
> turnLeft();
> turnLeft();
> turnLeft();
> move();
> putBeeper();
> move();
> }
> }

I assume this code is not yours. Look for a class with:

public void main( String[] args )

inside. That's the class to (attempt to) run.
Re: trying to run - first time [message #789495 is a reply to message #789359] Thu, 02 February 2012 22:24 Go to previous message
Eclipse UserFriend
On 02/02/2012 04:30 PM, Yoel Frischoff wrote:
> When running a program (OurKarelProgram) or another one, a message
> dialog pops: "Workspace does not contain a main type (do you have a
> public void run() method?"
>
> Mac OSX 10.7.2
> Eclipse 3.6
>
> Ideas?
>
> Thanks, Yoel
>

After seeing a number of posts in the Eclipse forums about Karel, I took
a look at the Stanford web site. Apparently Karel is a language
developed by Stanford. It is like Java, but it is not Java. There is
also apparently some Eclipse tooling that can be used to write Karel
programs.

Both the language and tooling are Stanford products. I doubt that you
will be able to get much help on the Eclipse forums. These forums are
meant for helping use the Eclipse tools not third party tools.

You should look into what support Stanford provides for their
language/tools.

>
> Here is the code:
>
> /*************************************************
> * File: OurKarelProgram.java
> *
> * A simple Karel program where Karel picks up a
> * beeper and carries it up a hill.
> */
>
> import stanford.karel.*;
>
> public class OurKarelProgram extends Karel {
> public void run() {
> move();
> pickBeeper();
> move();
> turnLeft();
> move();
> turnLeft();
> turnLeft();
> turnLeft();
> move();
> putBeeper();
> move();
> }
> }
>
>
Previous Topic:Fresh install on Mac OSX... Eclipse won't run
Next Topic:Identify eclipse bit version
Goto Forum:
  


Current Time: Sun Jul 27 12:25:05 EDT 2025

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

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

Back to the top