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 72965 - Can't run applets with custom launcher files
Summary: Can't run applets with custom launcher files
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: applet (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 13:53 UTC by andreas_e
Modified: 2006-12-04 22:05 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreas_e 2006-02-23 13:53:56 UTC
Yes, that is an issue for me. Certainly I can just work in a parallel way and 
always make alternate use of IE/Firefox and NB, but that's not what I want.
I followed the documentation applets => running in EVERY detail, but couldn't 
get anything but the standard appletviewer appearing with my applet.
My custom HTML file was completely disregarded.

Yes, I did copy it to src folder.
Yes, I also obeyed to the rule to never modify a launcher file in the build 
directory.
Yes, it was used when I right-clicked the .java file and the IDE copied MY file 
to build directory.

But I still was not able to either see the page title nor the text BELOW the 
applet. It seems this is just ignored, although the documentation definitely 
states that custom launcher files are supported.
However, you cannot use the appletviewer then.
Comment 1 Petr Jiricka 2006-02-27 15:13:49 UTC
No, appletviewer does not support this, it just shows the applet, not the
surrounding text on the page. Please use the "View" action on the launcher file
in the build directory to see the page in the web browser.
Comment 2 andreas_e 2006-02-27 16:41:45 UTC
Thanks for the answer, I appreciate your concern a lot.
So I will consider this a workaround, since the build directory is actually for 
building, as the name suggests. =)

Well, so I have following suggestion (as I've seen you'd marked TM as 5.5):
NetBeans could detect _applet_ code and when the user uses 'run' on the .java 
file (right-click), the launcher file is run with the applet inside, 
_considering_ the fact that the user might have a custom launcher file.
This is for applet mode and only this. Non-applet .java files SHOULD be run 
using appletviewer, but this should not be default. my 2c
Comment 3 andreas_e 2006-02-27 16:43:34 UTC
... should not be default _for applets_. Sorry, forgot.
Comment 4 Petr Jiricka 2006-02-27 16:59:40 UTC
Ok, changing to ENHANCEMENT.

I must say I still don't understand:

"Non-applet .java files SHOULD be run using appletviewer". I think Non-applet
.java files should be run using the "java" command. Appletviewer is _only_ for
applets.

And even with your suggestion, I don't think it solves your issue. You need the
applet to be run in *browser*, not appletviewer.
Comment 5 andreas_e 2006-02-27 17:03:01 UTC
OK, you have a point, sorry. I must have confused something (too much JS 
programming atm :)) ... sure thing, java applications which are not applets 
(*.java) use java _interpreter_, of course.
I stand corrected.
Comment 6 andreas_e 2006-02-28 10:33:14 UTC
AH ... WAIT.
I'm "in" again, and trying the solution you had given. Unfortunately the 'View' 
workaround in Files directory turned out to break with standard settings, i. e. 
classes assumed in classes folder. CODEBASE in launcher file must be 
specified "../classes" not "classes" ( file not found ). No go without manually 
editing the html file. You see? Those .html files in build directory are not 
supposed to be launched.
Comment 7 Petr Jiricka 2006-02-28 17:41:34 UTC
Worked for me. Did you try to open the Java console in the browser to see the error?