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 134497 - Run File menu option does not work with scala application
Summary: Run File menu option does not work with scala application
Status: STARTED
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-05 04:07 UTC by jdelajaraf
Modified: 2009-04-11 13:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Suggested fix in hg bundle format (10.55 KB, patch)
2009-03-21 07:25 UTC, staale
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jdelajaraf 2008-05-05 04:07:59 UTC
If one selects the Run File menu option under the Run Menu while a .scala file containing a scala application is open
the following error occurs :

init:
deps-jar:
compile-single:
run-single:
java.lang.NoClassDefFoundError: RunRational
Exception in thread "main" 
Java Result: 1

It happens because the ant task run-single receives the name of the class and not the fully qualified name which the
interpreter needs to execute the application.
Comment 1 jdelajaraf 2008-05-05 14:00:00 UTC
To be more clear the error message reads :

init:
deps-jar:
compile-single:
run-single:
java.lang.NoClassDefFoundError: myclass
Exception in thread "main" 
Java Result: 1

But myclass belongs to mypackage. If the reference ${run.class} in the run-single task is changed to mypackage.myclass
then the Run File menu works as expected.
Comment 2 staale 2009-03-21 07:25:52 UTC
Created attachment 78563 [details]
Suggested fix in hg bundle format
Comment 3 staale 2009-03-21 07:27:07 UTC
I have added a hg bundle that fixed several problems I had with the run this file. It now properly supports classes
extending Application, multiple main classes in a single file, including main classes in sub packages.
Comment 4 _ dcaoyuan 2009-04-11 13:23:20 UTC
@staale, you patches has been applied at: 8fe006d9f245