Posts

Showing posts with the label java

Running Java on Windows Mobile 5

Image
I'm doing development remotely for a mobile device that will run Windows Mobile 6 and use bluetooth through Java to connect to another host. Java is very generous as they offer a JavaFX framework that installs and runs on Windows Mobile 6 Professional without a hassle! (See " JavaFX Mobile 1.2 for Windows Mobile" at http://javafx.com/downloads/windows.jsp ) *Edit: 4/24/2010: Stay away from JavaFX if you need bluetooth support (or any other JSR's) on Windows Mobile! At the time of writing this, JSR support is not yet implemented! Unfortunately, the only device I have available is a Samsung i730 . This is unfortunate because JavaFX (The MIDlet standard) is only released for Windows Mobile 6. This i730 has Windows Mobile 5 installed and according to Verizon and Samsung, it IS NOT UPGRADABLE to Windows Mobile 6! So since my development resources are limited, I'd like to test the bluetooth stack of the application on a physical device (the client is not from the ...

Descriptor index not valid

"java.sql.SQLException: Descriptor index not valid." If you are running an SQL query (in this case with Java) against an AS/400 and get the above message, try replacing the code in your resultset loop. Find the line that looks like this: rs.getString(0) And replace with lines like this: rs.getString("PFNMCN"); Notice, the records is being retrieved by name instead of by index. Alternately, you can try: rs.getString(1); The underlying problem is resultset indexes start at [1] instead of [0]. This is confusing as most Java indexes start counting at 0. Hope this helps. What the message should probably say is "resultset index is out of bounds for the returned set". But jt400 is a free driver, so we can live with that message. :) Also note, that if you do "SELECT PFNMCN AS FIRSTNAME...", then your code should read: rs.getString("FIRSTNAME"); This java error message can be confusing at first, but it is a very quick fix! Edit: If you u...