Rabu, 21 September 2011

Struts and Hibernate for Developing Java Web

For a few days a go I try to make a website with framework Struts and Hibernate. First of all, I try to make a simple login form that connect to database. The Struts handles for views and controller meanwhile, the Hibernate handles the database. It's a very quite easy to develop a big web apps with this two framework. I also make my own database. When I write this blog, I'm in the middle of development. So, I will make a tutorial for Struts and Hibernate later after I finish my work. And also my workspace are Netbeans IDE, Struts, Hibernate, and Glasfish Server.

Jumat, 26 Agustus 2011

Restore Glassfish Server 3 in Netbeans 6.9.1 on Ubuntu 10.04

When I made a web application with Netbeans yesterday, I've got a little problem when start the server. For the information, I use Netbeans 6.9.1, and Glassfish server 3 bundled with it. The problem I faced that the port 8080 was already use by other program, so I must change the port to start the server. I follow the instruction from this,but the server was gone. And the project had a warning of resolve server problem.
From my analisys, I must add a new server to Netbeans, especially for Glassfish server. When I add the Glassfish Server 3, and search for the installation path directory, there was a warning "glassfish does not have a usable default domain". But I checked in the directory, there was a domain. In my opinion, may be the permission problem. So, I add the permission to the glassfish installation directory where located in /usr/local/glassfish-3.0.1 with command
$ sudo chmod -R 777 /usr/local/glassfish-3.0.1/
And I add server again, the problem was solved.

Sabtu, 20 Agustus 2011

A little Documentation from My Experience Developing Android on Devkit8000 (part 1)

This is my little documentation from my experience developing android in devkit8000. Actually, I focuss on developing application for Android with Android SDK and Eclipse in Ubuntu 10.04.
So, I just need an Eclipse IDE, JDK 5 or 6, and android SDK, yup, that's all tools for developing Android in my case. Ok lets start, for the first time I'll install JDK 6 in my PC. These are the steps:
1. Open Terminal
2. Edit /etc/apt/sources.list with your favorite editor. In example:
$ sudo gedit /etc/apt/sources.list
And then delete the '#' in front of the line below:
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
3. Update repository
$ sudo apt-get update
4. Installing sun java
$ sudo apt-get install sun-java6-jdk
5. For testing your java installation you can run this command:
$ java -version

This is the end of part 1, and for the next part I'll write how to install Android SDK and make emulator for Android.

Sabtu, 13 Agustus 2011

Translate Indonesian-English for Mobile Application

This is a little mobile application with J2ME code to translate from Indonesian to English. I use google translate API to translate the language. Here is the link for the API Google Translate API JavaME.
The Application is quite simple. And this is the capture of application
Tampilan Awal
Input Bahasa Indonesia
Output Bahasa Inggris

We can modify this to translate to different language. We can add option to this application to setting the language.
This is the jar file
TranslateIndo-Eng
If you want the source, you can contact me at nangdul56@gmail.com or ym: nang_dul@yahoo.com.

Selasa, 26 Juli 2011

My Second Publication: Implementasi Algoritma MD5 pada Aplikasi Login di J2ME

Alhamdulillah, in Saturday (23/7), there was a Seminar in my campus. It's called Seminar Nasional Pengaplikasian Telematika ( SINAPTIKA ). And I was one of the speakers in that Seminar. I speak about encryption, and I focus on the implementation of MD5 algorithm in Mobile Application. And this is my abstract for my research in Indonesia.
Abstrak—Pemrograman untuk aplikasi mobile dengan J2ME sedikit berbeda dengan pemrograman desktop pada J2SE. Salah satu perbedaannya adalah pengurangan beberapa class library pada library J2ME. Sehingga diperlukan beberapa perubahan susunan dari algoritma program dalam pemakaian library. Hal ini juga terjadi dalam penerapan atau pemakaian algoritma enkripsi MD5 yang sering dipakai sebagai pengaman password dalam sebuah aplikasi yang memerlukan aktifitas login. Pada penelitian ini, penulis mencoba membuat sebuah class baru yang dapat digunakan dalam implementasi dari algoritma MD5 pada aplikasi login pada bahasa pemrograman J2ME. Class baru yang akan menangani algoritma MD5 pada saat pembacaan password dari berkas csv yang dihasilkan oleh server. Penggunaan library pada class ini disesuaikan dengan library yang ada pada J2ME. Dari hasil pengujian class yang dibuat cukup mumpuni untuk menangani pemakaian algoritma MD5 pada aplikasi login di aplikasi berbasis mobile. Data-data yang dienkripsi oleh algoritma MD5 dapat dibaca dengan baik oleh class baru ini. Diharapkan class baru ini dapat dimanfaatkan untuk memerbikan fasilitas keamanan dalam sebuah aplikasi.
Kata Kunci : Rancang bangun aplikasi, aplikasi login berbasis mobile, algoritma enkripsi MD5

Rabu, 18 Mei 2011

QR Code Apps

QR Code is like a bar code, but more large and powerfull. I know QR Code when I visit kaskus.us and find an article about QR Code. I read it, and I've interested in this technology. So, I start browsing about QR Code and I've got an idea to make a small application to encode and then decode QR Code.
My idea is a small web based application to generate a QR Code image based on the user input. And the reader is on the mobile application that can run on handheld devices or mobile phone. And this is a QR Code image that contains my identity.

Senin, 14 Maret 2011

Creating Tone With Java

Actually this is my little research to make a simple multimedia apps. I start to make an application that make a tone based on the frequency and the duration. A lot of thanks for Princeton to provide this class StdAudio.java. It's very usefull to make this application work well.
This a method for create the tone.
private double[] tone(double hz, double duration) {
int N = (int) (StdAudio.SAMPLE_RATE * duration);
double[] a = new double[N+1];
for (int i = 0; i <= N; i++) { a[i] = Math.sin(2 * Math.PI * i * hz / StdAudio.SAMPLE_RATE); } return a; }


After make that method, we just call the variable that using the tone method, and play it with play method in StdAudio class. The example for implementation is below:
double[] a = tone(frek, dur);
StdAudio.play(a);

The capture of application

For more source you can download here ( Sorry for using this link, because there is no tools for uploading a file in my blog ). I use netbeans for develop it.