View RSS Feed

All Blog Entries

  1. Netbeans 6.1 New Feature

    by , 11-27-2011 at 06:56 PM (My Java Tips)
    Netbeans 6.1 is available now. There are many new and improved in NetBeans 6.x. In this post, I will list the newly added and improved features.



    Mobility (Java ME)
    source: http://www.netbeans.org/features/javame/index.html
    - Visual Mobile Designer (new)
    - Mobile Game Builder (new)
    - Modular Build System (new)

    Swing GUI Builder
    source: http://www.netbeans.org/features/java/swing.html
    - Beans Binding technology (JSR 295) ...
    Categories
    NetBeans
  2. Writing MIDlet for SMS

    by , 11-27-2011 at 06:53 PM (My Java Tips)
    SMS stands for Short Messaging Service and it is very common in mobile communication. J2ME provides an API for SMS which makes messaging very easy.


    I will write a MIDlet to show how to create a messaging system using javax.wireless.messaging.
    First step is to import all the required APIs:

    Java Code:
    import javax.microedition.midlet.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.wireless.messaging.*;
    ...
    Tags: api, midletj2me, sms Add / Edit Tags
    Categories
    Java ME
  3. MIDlet Suite

    by , 11-27-2011 at 06:44 PM (My Java Tips)
    In this post, I will introduce you to the MIDlet suite.


    I assume that you people have worked with Eclipse. In Eclipse, you create projects and all the contents of the project are placed in the project folder. It is an approach for managing the work.

    MIDlet suite is very much like a standard Java project in Eclipse. Please note that it's not a requirement to place MIDlets inside a Java Archive (JAR) file, but JAR files provide the most common means of distributing MIDP ...
    Categories
    Java ME
  4. Deploying MIDlets onto Mobile Devices

    by , 11-26-2011 at 07:43 PM (My Java Tips)
    The subject topic is very interesting and a lot of people have asked me about this. It is just a matter of knowing how this works. I am sure you will find it very interesting.


    MIDlets are programmed using Java Development environments like Eclipse, JBuilder,Netbeans or Sun Java wireless Toolkit. Once coded, they are build and tested on emulators. When all the tests are passed, you want to finally deploy it to your mobile device to see how it works in real world scenerio.
    ...
    Categories
    Java ME
  5. EJB - Entity Beans

    by , 11-26-2011 at 07:39 PM (My Java Tips)
    This post contains an introduction to Entity Beans.


    An entity beans are used to represent a business object in a persistent storage mechanism for example: customers, orders, products, employees etc. We normally refer persistent storage mechanism as a relational database. Normally, each entity bean has an underlying table in a relational database. Please note that each instance of the bean corresponds to a row in that table.

    Some people mix Entity beans with session ...
    Categories
    Java EE
  6. Accessing Beans (EJB)

    by , 11-26-2011 at 07:36 PM (My Java Tips)
    In the post, I will write about how to accessing a bean in EJB.


    Accessing deployed beans is simple. First write the the client code and set up JNDI environment settings for the client. It can be done via a JNDI properties file. Now you have to set the class path for the client and add the following file locations to it:

    jboss-client.jar, jnp-client.jar, EJB interfaces, and the directory where the JNDI properties file is stored

    Remember, two JNDI settings ...
    Tags: beans, ejb, jndi Add / Edit Tags
    Categories
    Java EE
  7. JBoss Application Server

    by , 11-26-2011 at 07:35 PM (My Java Tips)
    Talking about J2EE application servers, JBOSS is a popular choice. The reason is that JBOSS is open-source EJB solution with lot of impressive features that are missing in Weblogic, WebSphere, and the other big players.


    Some of the interesting features provided by JBOSS are:

    - enterprise-class security
    - transaction support
    - resource management
    - load balancing
    - clustering
    - database connection pooling
    - JavaMail support ...
    Tags: ejb, jboss Add / Edit Tags
    Categories
    Java EE
  8. Record Management System

    by , 11-22-2011 at 07:14 PM (My Java Tips)
    RMS is a database (flat file) which MIDlets can use to persist data. In this post, I will introduce the audience with RMS.


    The device platform maintains the integrity of the MIDlet's record stores throughout the normal use. The reboots, battery changes, etc. won’t affect the RMS. An interesting question developers ask is, where is this Record Store created? It is created at platformdependent location, like nonvolatile device memory, and is not directly exposed to the MIDlets.
    ...
    Tags: midlet, rms, timestamp Add / Edit Tags
    Categories
    Java ME
  9. TextField vs TextBox

    by , 11-22-2011 at 07:08 PM (My Java Tips)
    javax.microedition.lcdui provides TextField and TextBox which are sometimes confusing. Both are to allow the user to enter text, but question arises, when to use which one? In this post, I will try to address this issue.


    Let me first explain TextField (javax.microedition.lcdui.TextField). This class inherits from javax.microedition.lcdui.Item, so you should know that its an item that can be placed on a form. To create an instance of TextField, we use the TextField constructor: ...
    Categories
    Java ME
  10. Maven (intro)

    by , 11-22-2011 at 07:02 PM (My Java Tips)
    Maven is a software project management tool, based on project object model. It aims at reducing the load of developer by making in software build process simple and faster.


    Following are worth mentioning features of Maven:

    - Provides a uniform build system
    - Provides quality project information
    - Provides guidelines for best practices development
    - Allows transparent migration to new features

    When to use Maven is an interesting question. ...
  11. XML Pull Parsing (Demo)

    by , 11-22-2011 at 06:58 PM (My Java Tips)
    XML Pull Parsing makes parsing XML documents easier and efficient. This post introduces this API.


    You may get the required API from http://www.xmlpull.org/.
    Java docs are available at: http://www.xmlpull.org/v1/doc/api/or...ullParser.html

    Let me present an example of parsing XML using XML Pull Parsing.




    Java Code:
    public class SimpleXmlPullApp
     {
    
         public static void main (String args[])
    ...
    Categories
    XML
  12. Jsr 75

    by , 11-22-2011 at 06:52 PM (My Java Tips)
    JSR 75 specifies 2 optional packages for mobile devices. I will be talking about these in the next few posts.


    The two provided packages are:
    Java Code:
    javax.microedition.io.file
    javax.microedition.pim
    PIM stands for personal information and it contains following information:
    - contact list
    - todo list
    - events

    If you want to access these from a J2ME application, then javax.microedition.pim is to be used.

    ...
    Tags: j2me, jsr 75, pim Add / Edit Tags
    Categories
    Java ME
  13. Subversion (intro)

    by , 11-22-2011 at 06:45 PM (My Java Tips)
    Subversion is a centralized system for sharing information. It comprises of a repository, which is a central store of data. The repository stores information in the form of a file system. Clients can connect to this repository, and can read or write to these files. When a client writes data, it actually makes the information available to others; and when a client reads the data, it actually receives information from others. Its a typical client server system which uses version model.

    ...
  14. Subclipse

    by , 11-22-2011 at 06:41 PM (My Java Tips)
    Consider that you are working on a large/medium size Java project in teams. This is an ideal scenario for using Subversion to distribute and maintain source code. Good news is that you can use integrate your source code with Subversion within Eclipse environment.


    An Eclipse plugin called Subclipse is to be used for integrating source code with Subversion within Eclipse environment. You may download Subclipse from:
    http://subclipse.tigris.org/download.html

    Once ...
    Categories
    Subversion
  15. Reading/writing files

    by , 11-22-2011 at 06:26 PM (My Java Tips)
    This post is all about reading and writing text files on mobile device.


    In order to write files on the mobile device, you need com.motorola.file.writeaccess. If your application has that permission, you can write files easily using the following code.

    Java Code:
    FileConnection sc = (FileConnection)Connector.open("file:///phone/tmp.txt");
    OutputStream os = sc.openOutputStream();
    os.write(("text to go into the file").getBytes());
    ...
  16. Sending SMS (snippet)

    by , 11-22-2011 at 06:22 PM (My Java Tips)
    This post presents a snippet for sending short text messages from J2Me applications.


    The com.sun.midp.io.j2me.sms package provides an API for the Short Message Service Messaging system and allows MIDlet to access SMS functionality on a GSM mobile device. You need javax.wireless.messaging.sms.send premission to send SMS messages from your J2ME application. The sample code is presented below:

    Java Code:
    sender = (MessageConnection)Connector.open("sms://");
    ...
  17. GPS location / Cell id / Placing a call

    by , 11-22-2011 at 06:16 PM (My Java Tips)
    This post presents miscellaneous tasks that you can do in your J2ME application.


    Firstly, how to get GPS location. javax.microedition.location.Location provides support for this. Review the snippet below:

    Java Code:
    LocationProvider loc = LocationProvider.getInstance(null);
    loc.setLocationListener(ll,0,-1,-1);
    Location location = loc.getLocation(60*3);
    String lat = location.getQualifiedCoordinates().getLatitude();
    String lon = location.getQualifiedCoordinates().getLongitude();
    ...
  18. MIDP packages

    by , 11-22-2011 at 05:53 PM (My Java Tips)
    MIDP provides a standard run-time environment that allows new applications and services to be deployed dynamically on end-user devices like cellular phones and pagers. The MIDP is built upon CLDC (Connected Limited Device Configuration).


    MIDP is an industry-standard profile for mobile devices and it is not dependent on a specific vendor. It is a provides foundation for mobile application development. MIDP contains following 3 core CLDC packages:

    java.lang
    java.io ...
Page 33 of 48 FirstFirst ... 23313233343543 ... LastLast