This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146409 - Scala can't see the main() method
Summary: Scala can't see the main() method
Status: RESOLVED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-06 13:51 UTC by johnmuir
Modified: 2009-11-26 03:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnmuir 2008-09-06 13:51:36 UTC
Trying to run the program below (or any other one) gets the error message "Class 'Timer' does not have a main method"
which it obviously does. Any ideas what's wrong?

object Timer {
    def oncePerSecond(callback: () => unit) {
        while (true) { callback(); Thread sleep 1000 }
    }
    def timeFlies() {
        println("time flies like an arrow...")
    }
    def main(args: Array[String]) {
        oncePerSecond(timeFlies)
    }
}
Comment 1 blair_nilsson 2009-09-04 00:33:36 UTC
I created a new project, cut and paste in the code, and it ran first time, so its environmental. I'm not if that helps at 
all.
Comment 2 _ dcaoyuan 2009-11-26 03:56:15 UTC
Should have been fixed by new rewritten scala.editor