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.
Runing a class within a Web project with a main method runs the project instead of the class. The same happens with shift+F6 within the class source.
Please evaluate.
Works fine for me on yesterday's build: I created a fresh new Web Application project; then Java Main class in it and run it via Shift-F6 and via top menu 'Run File'. Product Version: NetBeans IDE Dev (Build 100830-ca2c595c9d1e) Java: 1.6.0_20; Java HotSpot(TM) Client VM 16.3-b01 System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_NZ (nb) Userdir: /home/david2010/.netbeans/_UD3
Will give it a try later today.
Created attachment 101776 [details] Sample Projects 1/4
Created attachment 101777 [details] Sample Projects 2/4
Created attachment 101778 [details] Sample Projects 3/4
Created attachment 101779 [details] Sample Projects 4/4
I cannot unzip your archive, I always get error: Archive: /home/david2010/Downloads/Sample Project Parts.zip warning [/home/david2010/Downloads/Sample Project Parts.zip]: zipfile claims to be last disk of a multi-part archive; attempting to process anyway, assuming all parts have been concatenated together in order. Expect "errors" and warnings...true multi-part support doesn't exist yet (coming soon). file #1: bad zipfile offset (local header sig): 4 file #2: bad zipfile offset (local header sig): 49 file #3: bad zipfile offset (local header sig): 762 file #4: bad zipfile offset (local header sig): 2572 [...] I was able to extract sources but most of the libraries are missing so I cannot compile/run file. I tried Run File on several random Java files from xinco web project but message box saying that file does not have a main class nor it is servlet is shown (accidentally it is shown four times in total - will try to fix at least that.) Which file do you run? Which exact version of NB and OS/JDK you run on? You can send test projects directly at my email at david.konecny at oracle. Or I can download it from somewhere. Thx.
For some reason atachments 1 and 4 point to the same file even though they show different file names in its details. I tried again on 6.9.1 and it works. I tried in Build 20100831001 and it starts the web app. I'm running the com.bluecubs.xinco.tools.MD5.java file. I'll send the files to the email provided in a bit.
Actually I committed those files to my project's repository. Probably easier to get from there. I had issues trying to send the file via email. https://xinco.svn.sourceforge.net/svnroot/xinco/trunk
Thanks for the patience. I checked out your project from SVN and was able to reproduce the problem.
c663d32468c3
Glad you were able to reproduce and fix the issue. Glad to help!
Just for record: this fix caused regression - issue 192922