• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Verification failed

 
Hampus Jakobsson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write an j2me application that opens a file and uses it's content. When trying with:
DataInputStream in = Connector.openDataInputStream( "file:text.txt" );
I get a Verification error; AppContext::createMIDlet@6
Could someone help me? Give me a hint (or a link) to further info about loading files in j2me.
 
Eric Giguere
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say J2ME, do you mean CLDC? MIDP? PersonalJava? I think you mean MIDP, in which case there's no support for loading anything from files. MIDP only supports HTTP as a protocol. To store anything persistently you have to use the Record Management System, a set of classes for dealing with a simple database.

------------------
Eric Giguere
author of:
Java 2 Micro Edition : A Professional Developer's Guide
PalmTM Database Programming: The Complete Developer's Guide
 
Hampus Jakobsson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are so right! It's MIDlets I'm trying to get into. What I want to do is to load information from a file to my class. I guess I will have to use a record. Any good tutorials or links?
 
Eric Giguere
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have a book on MIDP programming coming out this fall, but since I doubt you can wait, why not check out the J2ME Tech Tips I've written for Sun. A couple of them cover the MIDP record management system among other topics. You can see the list at:
http://developer.java.sun.com/developer/products/wireless/midp/ttips/
You may have to register with Sun to view them, but registration is free and gives you access to other interesting things on the developer.java.sun.com website.
P.S.: You can also read my current book :-)


------------------
Eric Giguere
author of:
Java 2 Micro Edition : A Professional Developer's Guide
PalmTM Database Programming: The Complete Developer's Guide
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this book:
http://www.amazon.com/exec/obidos/ASIN/189311550X/electricporkchop
Wireless Java by Jonathan Knudsen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic