This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark ""Bad Version Information" ???" Watch ""Bad Version Information" ???" New topic
Author

"Bad Version Information" ???

HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
Finally I built it up using CLDC 1.0 with MIDP 2.0, compiling is OK, preverify is OK, then I jared it, the book 'Learning Wireless Java' said make a manifest file as well, I don't know what do I need for a manifest file, so i ignored it, then I made a jad file, but when I run it(emulator), it told me something is missing: MIDlet-Name, in the manifest file, so I add it, then 'MIDlet-Vendor', 'MIDlet-Version', 'MIDlet-Configuration', 'MIDlet-Profile', for 'MIDlet-Configuration', i wrote 'CLDC-1.0', for 'MIDlet-Profile', i wrote 'MIDP-2.0', but when I emulate it, the phone appeared on my screen, and I could choose the app, but when I 'launch' it, I got a long long list of code (i think it's byte code) in the command line window, there's a line said "Warning: java.lang.ClassFormatError: Bad Version Information.", I suppose there's a text 'Hello, world!' on the phone's screen, but... so what's wrong?
[ December 01, 2004: Message edited by: HaoZhe XU ]

[url]Olnex.net[/url]
[SCJP 1.2, SCJD, SCWCD]
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
I found this from API:

ClassFormatError:
Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file

Is it because my j2sdk version is 1.5 ?
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I have no idea how difficult it is for you to use the WTK 2.1... It's very very easy to use that... You just need to create a project, then WTK will ask you what versions of CLDC and MIDP you will use... Do according to the instructions from WTK...

You can even try to run the examples coming with WTK... Just open an existing project, build and run... That's it!


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Sang-Wook Kim
Ranch Hand

Joined: Jan 07, 2004
Posts: 36
Hi,

I agree with Ko Ko. Write a very simple "Hello, World" example and build it with WTK and WTK will compile, preverify, create JAD file as well as MANIFEST file automatically. After bulding the application, have a look inside the files created and I believe you will have a better understanding!

Hyung Kim
(SCJD 1.4)
vince liu
Greenhorn

Joined: Feb 05, 2005
Posts: 1
I got the same question what HaoZhe XU post.
My jdk is same as HaoZhe XU .
Would anyone can help me to fixed the problem.
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
If you use the WTK, then it creates a default JAD file for you. If you are doing it by hand, then you have to create a JAD file, which is a simple properties file. There are some mandatory attributes that are needed for a JAD file.

Have a look at the JTWI specification or the CLDC/MIDP specs and they will list all the attributes that are necessary.

Just make sure you have them on the JAD file and everything should work fine.


Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: "Bad Version Information" ???
 
Similar Threads
Invalid Jar File
Objectives for the SCMAD exam are here!!
Unable to install on Nokia6670
Help on creating jar and jad files
Can not converte jad to prc files