How to make JavaME .jar files downloadable from Apache Web Server

Mobile application developers may have realize that one of the best (and recommended) way to distribute their JavaME/J2ME application is by hosting it on a website. This makes it easier for potential users to navigate and download the .jad or .jar files from their phone browsers and to execute it directly.

However, some web servers are not configured to handle .jar / .jad file requests, eventually leading to failed install response received by the mobile users.

To remedy this, .jad / .jar files need to be associated with the correct MIME type. In Apache, you can do this by creating ‘.htaccess’ file in your web directory, and inserting these lines :

# JavaME
AddType text/vnd.sun.j2me.app-descriptor .jad
AddType application/java-archive .jar

Afterwards, safe the file. The web server should behave accordingly when requests are made to either of these files. For other web servers, please refer to their respective manual or online-help on how to change document MIME type.

Ubuntu Tutorial Video from Screencast.Ubuntu.com

Reading through dozens of paragraphs, just to learn the basics of Ubuntu can be tedious, especially for those who don’t have much time on their hands to figure out about Ubuntu software repositories system. The good news is, they no longer have to read through articles full of vague descriptions anymore, instead they can get visual tutorial from Ubuntu Screencasts website!

The video listed on the website covers popular topics that would be asked by Ubuntu newcomers and is very easy to follow as it has narration. The videos are also available in high quality downloads (1280×720 resolutions) in several common media formats (flv, ogg, mp4).

The site is also updated weekly, and is one of Ubuntu sites that you shall not miss – Ubuntu Screencasts

Simmbook – an affordable $190 Business Netbook, with Ubuntu !

Behold! Simmtronics has launched its latest product, the Simmbook which is a netbook, priced at $190 only! The netbook is geared towards business users as it includes IBM Lotus Symphony, SmartWork client suite and various other IBM cloud-based services. The Netbook specs 10-inch display, Atom N270 processor, 1GB of RAM, three-cell battery, and a 160GB hard drive.

Best of all, it comes with Ubuntu pre-installed.

How to setup Secure Webserver HTTPS (SSL) on Apache in Ubuntu

Secure HTTP (SSL/TLS) has become a must if you are planning to setup a website which includes user authentication (ie. login box) or sensitive data. HTTPS prevents the sensitive data from being transfered across the network in clear text where it is susceptible to being sniffed or altered. Here is the tutorial on how to setup a secure HTTP on Apache web server in Ubuntu 10.04 (Lucid Lynx).

What do you need?

  • apache2 (Web Server)
  • openssl
  • A bit patient, because it will take some time to learn

Step 1: Create a self-signed certificate
You need to create a self-signed certificate with openssl. To do that you will need to generate the server key.


openssl genrsa -des3 -out server-sec.key 4096

…and certificate signing request (CSR)


openssl req -new -key server-sec.key -out server.csr

After that, generate the server certificate by signing it with the server key.

openssl x509 -req -days 365 -in server.csr -signkey server-sec.key -out server.crt

Keep the server-sec.key in a secure location, with read/write permission assigned only to root. Then generate a password-less copy of the key for Apache use.

openssl rsa -in server-sec.key -out server.key

By this time, you should have :

  • server.key (passwordless key for Apache)
  • server.csr (certificate signing request)
  • server.crt (certificate)
  • server-sec.key (server key)

Continue reading “How to setup Secure Webserver HTTPS (SSL) on Apache in Ubuntu”

Broadcom has released open source Linux Wifi 802.11n drivers

In a welcoming step, Broadcom finally released the the source code of its wifi (802.11n) Linux drivers under open source license. The source code can be found on the Linux staging-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-next-2.6.git in the in the drivers/staging/brcm80211 directory. The open source drivers will support current chips (BCM4313,BCM43224, BCM43225) and it also acts as a framework to support future chips by Broadcom.

This can be considered as a significant move made by the company, as Broadcom chips are widely in use on laptops and netbooks in the market. Its competitor, Atheros, has already open sourced its drivers back in 2008, which in turn, made Atheros drivers much better supported on various operating system platform compared to Broadcom.

Previously, Linux users with Broadcom chip, have to rely on NDISwrapper utilities to enable the wifi functionality on their laptops.

[source][via]

DateDiff – A simple JavaME mobile app to calculate the day differences between two dates

There are times where I am required to calculate the day/month/year differences between two dates, which I found a little bit troublesome to do repeatedly even if it is just a simple estimate. So in turn, I created this mobile app to do the job, which greatly increase my productivity! Here i’m releasing the source code to DateDiff, which is coded and compatible with all JavaME phone:

DateDiff mypapit

DateDiff.jar – binary (MIDP 2.0)
datediff_src.zip (source code)

DateDiff is copyrighted by me, and is licensed under a BSD-like license, you can read the terms of use from the ‘About’ menu or from the source code.