Page 1 of 3 123 LastLast
Results 1 to 20 of 47
  1. #1
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Question Can I create a java program for this older classic mobile

    Hi there,

    I own a mobile/cell phone that is from 2008, I bought it the following year though. It has two java games on it. It also has bluetooth and very crude web access. I have never been able to buy a game for it.

    I would like to know, can I essentially create a 'hello world' java program that I can select in the games section of the phone? Or is this one of those phones were you can only a buy a game for it in particular.

    Below is a link that will show an image of it, though more importantly it is a review. I think the onboard memory is 2MB in total. Ah after skim reading it it says Java MIDP 2.0?

    LG KP170 | Review, News & Deals | SoMobile

    If possible, where do i begin with my basic goal?

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Can I create a java program for this older classic mobile

    I'd start by looking for an SDK for whatever OS runs on that phone.
    Get in the habit of using standard Java naming conventions!

  3. #3
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    Ah I see.

    There doesn't appear to be an OS listed for it. Then the games that are available were developed by whom?

  4. #4
    jashburn is offline Senior Member
    Join Date
    Feb 2014
    Posts
    219
    Rep Power
    1

    Default Re: Can I create a java program for this older classic mobile

    It seems that you can download games for the phone. See Free mobile games. Download java games for mobile phones. (select your phone model on the right-hand side of the page).

    MIDP is indeed relevant to your question. See

    To find out about developing MIDlets for the phone, just search in the Internet using the search term "develop midlet". Here're some example tutorials:

    Note: I have not developed MIDlets before, so my knowledge is theoretical.

    Looks like LG do have an SDK for Java ME development: Go to LG Developer > (left-hand nav bar) Java ME > (look through the Overview tab) > SDK & Tools tab > SDK > select your phone model on the Supported Phone dropdown list.

    Btw, I'm curious... why are you asking about MIDlet development when mobile development these days is pretty much about developing for smartphones?

  5. #5
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    Hi there,

    I see, I believe it is possible. I found KP 170 LG SDK 1.5 for the Java™ ME Platform SDK been released since Jan 2010.

    Well, I'm not a computer programmer. Many years ago about seven, I was a college student doing IT, wasn't successful at it. But nevertheless, I tried to press on in other areas. And last year I bought a cheap copy of VS 2003 for programming in Visual Basic, my attempt was bare bones type of game, nothing interesting. I was able to create an Asteroid shooter game. I drew the asteroid in Paint, and programmed the computer in Python to display circles inspired from Mr Bushnell's November 1971 marketed computer space game and print screened it and then scaled it in photo shop to get my result I was looking for.

    So I'm just trying to do something perhaps similar. But I'll want to give the hello world a start first. And either use vertex graphics or just import a slightly more scaled down Bitmap file would be easier, and manipulate the image using a key.

    I guess I'll need to install the SDK first, and try out the emulator, I imagine.

    The SDK asks for Java 2 SDK. I'm running Windows XP 32 bit. I can't install the latest Java 8.
    Last edited by JavaforKP170phone; 03-21-2014 at 02:05 AM.

  6. #6
    jashburn is offline Senior Member
    Join Date
    Feb 2014
    Posts
    219
    Rep Power
    1

    Default Re: Can I create a java program for this older classic mobile

    LG's Software Requirements section under the Overview tab states, "Java Standard Edition Development kit (JDK) version 1.6 or higher, or Java Standard Edition Runtime Environment (JRE) version 1.6 (If you plan to do actual development, install JDK. Otherwise if you only plan to run the sample applications, install JRE.)" This means you can use Java 7 that is still available for download from Java SE - Downloads | Oracle Technology Network | Oracle.

    Have you thought about trying your hand at Android smartphone app development? Emulators are readily and freely available, and Java is used to write the apps.

  7. #7
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    This phone I own is current and only phone, so this will have to do. I want to program the computer, and compile the file and then send it over bluetooth from the computer. I imagine it should run?

    It would appear that I would need to download from Oracle's archive. As the SDK requires Java 2. I tried to install Java 7 from the download section, how ever it requests to close a number of processes, and then everything disappears on the desktop. I have to turn the system off.
    Last edited by JavaforKP170phone; 03-21-2014 at 01:55 PM.

  8. #8
    jashburn is offline Senior Member
    Join Date
    Feb 2014
    Posts
    219
    Rep Power
    1

    Default Re: Can I create a java program for this older classic mobile

    I assume it would, once you have packaged up the code exactly as documented, and transferred them to the phone.

  9. #9
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    I installed Java 7 with update 51, how ever the LG SDK still asks for Java 2. So I won't be able to use Java 7?

  10. #10
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Can I create a java program for this older classic mobile

    I can't imagine it is asking for Java 2 as that name was never used; it would have to ask for Java 1.2 in that case. It is probably asking for a J2SE JDK, which is an old abbreviation for the Java Standard Edition platform; nowadays it is just called "JSE". All versions of Java from 1.0 up to and including 1.4 were called "j2se". After Java 5 was released, the label "j2se" kept on being incorrectly used for a long time still. That might be the case here too.

    Regarding your problem: you might be installing the wrong version; make sure you are using a 32 bits version and not the 64 bits version. Legacy runtime detection routines don't recognize a 64 bits runtime as being a valid Java installation. If that doesn't work you'll have to try installing Java 6 in stead.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  11. #11
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    Okay, I'm going to try Java 6 with the latest update of it.

  12. #12
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    I imagine double posting isn't allowed here. The program works with six. How ever why do I need alternative text editor to begint typing up code? I couldn't find the kp170 skin. The page doesn't work via the SDK.

  13. #13
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Can I create a java program for this older classic mobile

    I have no idea what you're talking about. What "alternative editor"?? Which "kp170 skin" ?? Which "page" ?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  14. #14
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    Quote Originally Posted by gimbal2 View Post
    I have no idea what you're talking about. What "alternative editor"?? Which "kp170 skin" ?? Which "page" ?
    A template of the specific phone when the program is run, there is a list of skins available. And Textpad is suggested for the 'helloworld' program?

  15. #15
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,848
    Rep Power
    5

    Default Re: Can I create a java program for this older classic mobile

    But you are allowed to think for yourself, so use your favorite editor. For any other problems, refer to whatever documentation exists of the SDK.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  16. #16
    jashburn is offline Senior Member
    Join Date
    Feb 2014
    Posts
    219
    Rep Power
    1

    Default Re: Can I create a java program for this older classic mobile

    Quote Originally Posted by JavaforKP170phone View Post
    How ever why do I need alternative text editor to begint typing up code?
    The Hello World tutorial web page suggests Textpad but it doesn't mean you have to use it. As gimbal2 noted, you can use any text editor to write your code. In fact if you go back to LG's web site, on the LG SDK 1.5 for the Java™ ME Platform page there is a Related Resource section listing various documentation including LG SDK 1.5 for the Java™ ME Platform User Guide. This user guide suggests jEdit if you don't have a favourite text editor. (Incidentally jEdit is a really good text editor. I use it myself.)

    Quote Originally Posted by JavaforKP170phone View Post
    I couldn't find the kp170 skin. The page doesn't work via the SDK.
    The SDK comes with some skins, but I wouldn't imagine it'll have skins for all LG's phone models - there're just too many models. There is a skin package download at LG's web site, but that too doesn't appear to include KP170. In this case just choose a skin that's closest to your model.

    I'd suggest that you go through LG SDK 1.5 for the Java™ ME Platform User Guide. It contains a sample project similar to the Hello World tutorial, but written from the SDK's perspective. You may have better luck getting your first MIDlet working with it.

  17. #17
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Default Re: Can I create a java program for this older classic mobile

    I opened the helloworld file using notepad.

    I was able to build, and package it and then sent the file over. I couldn't install it. It says there wasn't enough info between the app and the site it would be from. All the file is, is just called helloworld. There is no actual code, its only 1kb.

  18. #18
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Question Re: Can I create a java program for this older classic mobile

    I tried this, but it doesn't display on the emulator. I imagine the code on it's own should run fine without the other pieces?

    I thought about trying the LG forums, but it is pretty much deserted..

    Java Code:
    /*
    * rocketship.java
    */
    
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    
    public class rocketship extends MIDlet {
    
        Display mydisplay;
        Form myForm;
        image myimage;
        
        public void startApp(){
            mydisplay = Display.getDisplay(this);
            
          myform = new form("Rocketship");
           
    	try {
    	myimage = image.createimage("/ico.JPG");
        	}
    	
            catch(Exception exc) {
    	
    }
    
          myform.append(myimage);
    
          mydisplay.setcurrent(myform);
    
    }

  19. #19
    Join Date
    Mar 2014
    Posts
    30
    Rep Power
    0

    Question Re: Can I create a java program for this older classic mobile

    java.lang.ClassNotFoundException: Image1
    - java.lang.Class.forName(), bci=0
    - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
    - com.sun.midp.midlet.MIDletStateHandler.createMIDle t(), bci=66
    - com.sun.midp.midlet.MIDletStateHandler.createAndRe gisterMIDlet(), bci=17
    - com.sun.midp.midlet.MIDletStateHandler.startSuite( ), bci=189
    - com.sun.midp.main.AbstractMIDletSuiteLoader.startS uite(), bci=52
    - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite (), bci=8
    - com.sun.midp.main.AbstractMIDletSuiteLoader.runMID letSuite(), bci=161
    - com.sun.midp.main.MIDletSuiteLoader.main(), bci=22
    7079 - CORE - ERROR - 1 - The application cannot be launched. One of the application classes appears to be missing. This could be due to a misnamed class. Contact the application provider to resolve the issue.
    Image1
    Java Code:
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    
    
    public class Image1 extends MIDlet{
    
        Display mydisplay;
        Form myForm;
        image myimage;
    
        public void startApp() {
        mydisplay = Display.getDisplay(this);
        myform = new form("Image1");
        try{
        myimage = image.createimage("/ico.jpg");
        }
        catch (exception exc) {
        }
        myform.append(myimage);
        mydisplay.setcurrent(myform);
    }
    
        public Image1(){
        }
       
        public void pauseApp() {
        }
        
      public void destroyApp(boolean unconditional) {
            
        }
    }
    Can anyone please suggest what the error is stating?

  20. #20
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: Can I create a java program for this older classic mobile

    ClassNotFoundException: Image1
    The message says that the definition for the class named: Image1 can not be found.
    If you don't understand my response, don't ignore it, ask a question.

Page 1 of 3 123 LastLast

Similar Threads

  1. Create Java Enterprise Application with Mobile Client
    By praveensingh18 in forum Advanced Java
    Replies: 2
    Last Post: 08-24-2012, 11:29 PM
  2. Replies: 11
    Last Post: 02-18-2012, 04:10 PM
  3. Replies: 2
    Last Post: 01-27-2011, 08:58 PM
  4. java swing program to send message to a mobile?
    By Manish87 in forum AWT / Swing
    Replies: 2
    Last Post: 12-05-2010, 08:09 AM
  5. How to receice sms from mobile through some gateway Using java program
    By sk.mahaboobbhasha@gmail.c in forum CLDC and MIDP
    Replies: 0
    Last Post: 12-13-2008, 11:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •