The Fourth Path

How to Create Portable Applications for PCs in NTU

Posted in Computer, How to, NTU, Programming, Singapore by nmutiara on 2008/11/30

There is no magic here. At least you should know that most PCs in NTU:

  1. run Windows XP
  2. have Java Runtime Environment (JRE) installed
    To check which Java version is used, google “check java version” [without the quotes] and visit the first page in the search result.
  3. have FlashPlayer plugin installed

Most PCs in NTU run Windows XP

Since the PCs are running Windows XP, you can do the following.

  1. Create some programs in C++/C#/anything that use Windows API or… sort of
  2. Make the executable in Windows environment

Those tasks can be helped by IDEs such as have Ms Visual Studio [there is the free version for students, anyway] or Eclipse.

Advantage: In Windows, your program created using this method work faster than the program created using the other methods, if and only if the same algorithm is used. This is because native environment is used.

Disadvantage: The program will not work if non-Windows operating system is used. Some computers in ADM uses Mac, while some computers in Computing Labs uses Fedora (a Linux distribution).

Most PCs in NTU have Java Runtime Environment (JRE) Installed

Once you understand how to create an application using Swing GUI, the application will work in any computer that has JRE.

To implement Swing GUI, there are two ways.

  1. Using JFrame
    JFrame looks like ordinary application.
  2. Using JApplet
    JApplet runs on appletviewer and web browsers. The web browsers must have Java plugin enabled. JApplet has limited access to the client’s file. If it is to access the client’s file, jarsigner is needed.

I usually uses Netbeans to create JApplet form and add the JApplet into a JFrame. This makes the application can run on web browsers and desktop.

Computer Science students in NTU should be able to do this at least after Swing is taught in CSC203.

Advantage: As the SUN’s slogan says, “Write once, run anywhere.” Your program works on Mac, Windows, and Linux! Well, it’s not true if JRE is not installed…

Disadvantage: Sometimes noticeable slow performance………… Slow loading time for JApplet…

Most PCs in NTU have FlashPlayer Plugin Installed

This is true, because the NTU homepage contains Flash animation [which takes a long time to load in other countries...].

Advantage: Practically, same as SUN’s slogan. Loading time is faster than that of JApplet.

Disadvantage: This works in web browser and flash movie viewer or sort of. File access and desktop application are not supported [I've tried google but I found nothing about both]. The full Adobe Flash software is needed. However, there is the open source version.

Tagged with: , ,

Leave a Reply