EvilZone

Programming and Scripting => Java => Topic started by: m0l0ko on December 21, 2012, 01:35:27 AM

Title: Eclipse - How to load parameters from the <param> tag in HTML files
Post by: m0l0ko on December 21, 2012, 01:35:27 AM
If I have a HTML file:
Code: [Select]
<applet code="MyApplet.class" width="300" height="100">
  <param name="parameter1" value="whatever">
</applet>

Then I can usually get the value of the <param> tag by using getParameter("parameter1") but if I test the applet in eclipse, it doesn't load the param value, which makes sense because I haven't even told it where the HTML file containing the param tag is. How can I get eclipse to load the HTML file when it runs an applet?
Title: Re: Eclipse - How to load parameters from the <param> tag in HTML files
Post by: Kulverstukas on December 21, 2012, 10:10:49 AM
You're doing it wrong.
HTML's param tag is when you load the applet from the HTML, duh.
To pass parameters in the IDE, go to
Run -> Run configurations -> select your projects -> open Arguments tab -> put whatever arguments in there