Monday, 15 March 2010

Pass parameters to a Java Applet from Java Program -



Pass parameters to a Java Applet from Java Program -

i want alter os.name property before invoking applet.

(using appletviewer -j-dos.name=windows on linux raises lot of exceptions, understandably so)

so, figured i'll utilize system.setproperty() set os name in java programme (i.e. jvm on starting have right os name, applet won't) , invoke applet there (by calling it's init() function)

the issue don't know how pass parameters applet (the ones i'd using param html tag for.)?

any ideas?

i think might possible implementing appletstub interface, i'm not sure how implement other methods (apart getparameter).

you can browse source code of appletviewer openjdk ideas, or reuse code purposes. however, possible display applet in less code that, if don't need features of oracle's appletviewer. found this 1 ian f. darwin, or post sandeep sharma seems stripped-down version.

java parameters applet

No comments:

Post a Comment