You are here

leelight's blog

Some JSR 179 Location API J2ME examples

The first 3 examples come from http://www.j2melbs.com/ .
1, The basic Location Question
Download: http://www.j2melbs.com/content/codes/lbs/CoordinateAlert.java

  1. import javax.microedition.lcdui.*;
  2. import javax.microedition.midlet.*;
  3. import javax.microedition.location.*;
  4.  
  5. public class CoordinateAlert extends MIDlet implements CommandListener {
  6.  
  7. private Display display;
  8. private Form mainForm;
  9. private Alert positionAlert;
  10.  
  11. public CoordinateAlert() {
  12.  
  13. mainForm = new Form("HelloMIDlet");

Blog: 

EPSG:4326(WGS84) WMS in Openlayers and EPSG:900913 Google Map

In SUAS Map Server I used Openlayers to display WMS layers in EPSG:4326 SRS with Google Map, I found the WMS overlays are always be transformed, now i kown the reason. EPSG:4326 != EPSG:900913

Test Push Registry in Wireless Toolkit 2.5(WTK)

There is many articles about how to test Push Registry with sms, here will give some hints how to test it in WTK.

I. Edit *.jad configuration

MIDlet-1: appname,/app.png,com.easywms.midlet.midletClass
MIDlet-Permissions: javax.microedition.io.PushRegistry
MIDlet-Push-1: sms://:50000, com.easywms.midlet.midletClass, *

or MIDlet-Push-1: sms://:50000, midletClass, *

II. The app must be install via OTA in WTK, this is required for WTK Push testing

Blog: 

Get CellId and other Imformation from mobile phones via J2ME

Without GPS or Network Operator we can still use the Location Based Service, via the help of CellId(Cell ID the location of Cell Identities of GSM-networks). Google has one enormous database of cell ids which are linked to a longitude and latitude position, that why Google Map client know where you are even you have no embedded GPS--it is not open.

The JavaME Frequently Asked Questions List (T)

 

The JavaME Frequently Asked Questions List

The JavaME Frequently Asked Questions list is a compilation of questions that are
asked frequently by people using
Java 2 Micro Edition
.

Maintained by:

Blog: 

50 Websites that make amazing use of javascript (T)

From : http://www.kriesi.at/archives/50-websites-that-make-amazing-use-of-javascript

 

Since the rise of Javascript frameworks like jQuery, Mootools and
Prototype, developers created stunning javascript solutions and effects
for their websites.

Below are 50 inspiring Websites that make good use of Javascript,
Websites which I have bookmarked over time for inspiration purpose.
Some of them are selected purely on look and feel, some have really
extraordinary Javascript functions implemented.

Blog: 

Oracle and java.sql.SQLException: No suitable driver

Strange problem, just one part of simple code, works on my XP system, but not on Windows2003.

  1. Connection connection=null;
  2. try{
  3. connection = DriverManager.getConnection ("jdbc:odbc:thin@192.168.2.107:1521:Schemaname", "username", "password");
  4. PreparedStatement pstmt = con.prepareStatement ("Select * from sometable");
  5. ResultSet rset = pstmt.executeQuery();
  6. ....................

Very simple SQL code for one servlet, but when i run it in Tomcat, i got this exception:

  1. java.sql.SQLException: No suitable driver found for

Blog: 

"Cannot allocate memory" OutofMemory when call Ant to build Polish project in Tomcat

I have written one J2EE web service which was run in Tomcat, this service will call Ant to build one J2ME Polish project. It can be run without problem, aber will got such exception "ProGuard is unable to obfuscate: java.io.IOException: Cannot run
program "java": java.io.IOException: error=12, Cannot allocate memory" after several times' building. This is abvious OutofMemory exception.

Tomcat service was run on CentOS linux, the first thing what i thought is to increase the initial memory of Tomcat.

HTTPS Connection with Tomcat and WTK emulator

1. Tomcat Configuation

Creating HTTPS Connection

Firstly should create a temporarely SSL certificate to use the
Tomcat in an SSL mode.

Blog: 

MIDlet jar signing (a tutorial) Revised (T)

Author: David Hayes
Link: http://www.spindriftpages.net/blog/dave/2006/06/18/midlet-jar-signing-a-tutorial-revised/

Recommended to visit original blog to view lots of useful comments 

 

Blog: 

Pages

Subscribe to RSS - leelight's blog