logo


Installation - MyFileDownloader
Below you will find some installation examples in HTML of MyFileDownloader. You need to put this HTML code inside your web page.

MyFileDownloader consists of two jar files, myfiledownloader-standard-signed-1.0.3.jar and labels.jar. The name of the first one slightly differs depending on the edition you are using. The labels.jar file contains the English labels. The jar files must be placed in the same directory as the HTML page.

In the examples below some applet parameters are used. With the applet parameters the look and feel and the behaviour of the file downloader can be changed. For a complete list of parameters click here.

Example 1
This is the most basic example. The applet tag is given with the required parameter 'primaryDownloadURL'. This example will generate a button with the text 'Download'. After the download a pop up will be shown with the message 'Download completed'.

<applet name="MyFileDownloader" 
   code="com.javaatwork.myfiledownloader.MyFileDownloader.class" 
   archive="myfiledownloader-standard-signed-1.0.3.jar, labels.jar" width="340"  height="50">
   <param name="primaryDownloadURL" value="<download-url>">
</applet>
                  
basic configuration


Example 2
This example is the same as example 1 only the German language file is used. The German labels are stored in the file labels_de.jar. This file is added to the archive attribute. With the applet parameter 'language' the German language is selected. See for other languages the applet parameter 'language'.

<applet name="MyFileDownloader" 
   code="com.javaatwork.myfiledownloader.MyFileDownloader.class" 
   archive="myfiledownloader-standard-signed-1.0.3.jar, labels.jar, labels_de.jar" 
   width="340"  height="50">
   <param name="primaryDownloadURL" value="<download-url>">
   <param name="language" value="de">
</applet>
                  
configuration with a German language pack


Example 3
This example uses a custom download label. The label of the download button can be changed with the applet parameter 'downloadLabel'. After the download the user is redirected to the success / confirmation page (applet parameter 'successURL').

<applet name="MyFileDownloader" 
   code="com.javaatwork.myfiledownloader.MyFileDownloader.class" 
   archive="myfiledownloader-standard-signed-1.0.3.jar, labels.jar" 
   width="340"  height="50">
   <param name="primaryDownloadURL" value="<download-url>">
   <param name="downloadLabel" value="Download Now file XXX 230 MB">
   <param name="successURL" value="<url-of-success-page>">
</applet>
                  
configuration with a custom download label and a redirect


Example 4
This example uses the Windows look and feel. The look and feel can be changed with the applet parameter 'lookAndFeel'.

<applet name="MyFileDownloader" 
   code="com.javaatwork.myfiledownloader.MyFileDownloader.class" 
   archive="myfiledownloader-standard-signed-1.0.3.jar, labels.jar" 
   width="340"  height="50">
   <param name="primaryDownloadURL" value="<download-url>">
   <param name="lookAndFeel" value="2">
</applet>
                  
configuration with the Windows look and feel

dot