Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: How to start writing Java Apps for Cell Phones?

  1. #1
    Junior Member Jchang504's Avatar
    Join Date
    Nov 2008
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default How to start writing Java Apps for Cell Phones?

    I read that Java is the language commonly used for cell phone applications. How exactly would you write a program like this, any special syntax? Then how would you get it on the phone, simply by pasting it into the phone's memory in the right spot? Is this something that can be done by a normal java programmer and you don't have to know any complex details about the phone, or can a java program only be put on the phone while it is being manufactured by the company that makes it?


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Writing Java Apps for Cell Phones?

    Hello Jchang504,

    I have moved this thread over to our Java ME forum.

    This is because cell phone applications are written with Java Micro Edition.

    Java Platform, Micro Edition (Java ME) provides a robust, flexible environment for applications running on mobile and other embedded devices—mobile phones, personal digital assistants (PDAs), TV set-top boxes, and printers. Java ME includes flexible user interfaces, robust security, built-in network protocols, and support for networked and offline applications that can be downloaded dynamically. Applications based on Java ME are portable across many devices, yet leverage each device's native capabilities.
    I suggest you read through these 2 links. They will give you all the information you need to know!

    Java ME - the Most Ubiquitous Application Platform for Mobile Devices

    Java Platform, Micro Edition - Wikipedia, the free encyclopedia

    Nearly all cell phones will run Java applications now days. You don't need a special type of phone or any complex knowledge on how the phone works.

    Good luck
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member Jchang504's Avatar
    Join Date
    Nov 2008
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Writing Java Apps for Cell Phones?

    This is great! I look forward to writing some applications. But if I use a class like JOptionPane, which is what I usually use if I don't really need any GUI, will the default look-and-feel work on a cell phone? Or are there only certain classes I can use for a mobile device application?

  4. #4
    Junior Member Jchang504's Avatar
    Join Date
    Nov 2008
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Writing Java Apps for Cell Phones?

    I'm still a bit confused after reading wikipedia and and the download page. I downloaded it, but do I write applications in an IDE or can I write just with wordpad like I do for some of my Java applications? And once I have the file in an executable form (.class or whatever ME uses) how do I load it to a phone? Where do I have to save it?

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Writing Java Apps for Cell Phones?

    Hello Jchang504,

    Yes you can write these applications like you would normally but you will need to have a emulator which emulates the application working on a mobile environment.

    You can download the Sun Wireless Toolkit for this. Check these:

    Java ME Emulator Toolkits

    Java ME Technology APIs & Docs

    All mobile phones come with a computer cable or bluetooth which will allow them to be connected to the computer. You can upload and run .jar files on mobile phones.

    I have limited knowledge of Java ME but I suggest you download the wireless toolkit and read the documentation
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  6. #6
    Junior Member Jchang504's Avatar
    Join Date
    Nov 2008
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Writing Java Apps for Cell Phones?

    I downloaded the Java ME SDK 3.0 from here: Download Java Platform Micro Edition Software Development Kit 3.0
    Is that the right thing to download?

    And if you say .jar files run on a mobile phone, that means I can load in some of the programs I have already packaged as .jar 's that I use on my computer?

  7. #7
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Cool Re: Writing Java Apps for Cell Phones?

    Quote Originally Posted by Jchang504 View Post
    I downloaded the Java ME SDK 3.0 from here: Download Java Platform Micro Edition Software Development Kit 3.0
    Is that the right thing to download?

    And if you say .jar files run on a mobile phone, that means I can load in some of the programs I have already packaged as .jar 's that I use on my computer?
    Hello Jchang504.

    Yes this is the correct IDE to download. It looks like it contains everything you need to get started including the mobile emulation.

    You cannot run your normal applications on a mobile as a .jar. Your .jar need to contain J2ME Midlets.

    Traditionally, Java downloadable packages have been called applets. For J2ME, however, these downloadable packages are referred to as midlets, as they are written for the Mobile Information Device Profile - or MIDP - which is specifically designed for the constraints of a mobile phone. So, when you download 'Java', you're downloading a Java midlet.
    It's the midlets that contain the Java code that make the thing you downloaded actually do something. The great thing about Java is that you really don't need to know anything about how it all works in order to use it. All the code that's part of a midlet is contained in something called a JAR file (short for Java ARchive file, and identified by its file extension .jar), which is basically just a zip file that keeps all the files and classes specific to that midlet together. This means you need only worry about one file - the .jar file - irrespective of how complex the code contained within that file's classes is. It's the .jar file that you download onto your PC, upload onto your phone from your PC, or transfer onto your phone over the air via WAP.
    Please read this tutorial:

    HowTo: Install Java J2ME midlets on your mobile phone
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  8. The Following User Says Thank You to JavaPF For This Useful Post:

    pioneer (February 10th, 2011)

  9. #8
    Junior Member
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Writing Java Apps for Cell Phones?

    Java Micro Edition is a good platform especially designed for developing apps for mobile phones and PDA’S. It provides easy and user friendly solutions.

Similar Threads

  1. Writing java applications for the iPod Touch
    By JavaPF in forum Java ME (Mobile Edition)
    Replies: 8
    Last Post: June 14th, 2011, 04:34 PM
  2. I need help writing this program
    By kev2000 in forum Algorithms & Recursion
    Replies: 5
    Last Post: June 4th, 2009, 03:14 AM

Tags for this Thread