Automatically generate HTML files for appletviewer to run Java Applet

Source: Internet
Author: User

I started to learn Java by myself these days and set up eclipse as a development environment. I found that it was too intelligent to learn. So I searched and set up the simple Java Development Environment on editplus, which is really suitable for learning. The disadvantage is that it is impossible to configure a user tool to run Java Applet conveniently, because appletviewer only recognizes HTML files, not. class file. Under the rogue, you have to write a small C language program by yourself, and use it to automatically generate the HTML file corresponding to the Java Applet, and then use appletviewer to run it.

I have uploaded this small program to the 115 network disk. If you need it, you can download it.

Go to the download page: javaapplethtml.zip

Java applethtml.exe, which is easy to use, is extracted after compression and runs in the command line.

Description: generate the HTML file corresponding to the Java Applet in the same directory for appletviewer to run.

Usage: javaapplethtml <full file path> <window width> <window height>

Example:
Run javaapplethtml D: \ Java \ myapplet. Class 320 240
Generation: D: \ Java \ myapplet.html
Note: You can run the "appletviewer D: \ Java \ myapplet.html" command"
Run myapplet. Class of 320*240 in Web Browser
In addition, you can configure the program
Editplus and other text editor user tools.

Let's talk about how to configure editplus:

1) Copy javaapplethtml.exe to the appropriate directory. I will place it in the D: \ Java \ directory;

1) Click "Tools"-"Configure user tools" to bring up the dialog box;

2) configure the "generate Java Applet HTML file" tool and click "add tool". Enter the following information based on the actual situation, here I fill in "generate Java Applet HTML file" in "menu text", "Command" in "D: \ Java \ javaapplethtml.exe", and "parameter" in "$ (filepath) 320 240 ", fill in" $ (filedir) "in" Initial directory ", and select" Capture output ";

3) configure the "run Java Applet" tool, click "add tool", enter "run Java program" in "menu text", and enter "$ (filedir) in" Initial directory) ", and select" Capture output ";

4) Well, it's done. Click "OK.

OK, so that we can easily use editplus for Java Applet development and running.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.