Manifest-Version: 1.0
Main-Class: MyViewer
I've already put that into the manifest file and it runs fine on windows. But on pocket pc...there is no program associated with jar files.
Main Topics
Browse All TopicsHello. I just bought the J9 JVM and installed it to my pocket pc. I want to be able to run a simple java program that I wrote. The example they gave works, but I can't execute my program (jar file).
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi there,
Using the JVM on pocket PC is different from normal usage. To use the virtual machine, invoke j9.exe or j9w.exe. The first one is equivalent to java.exe in traditional J2SDK, the second is equivalent to javaw.exe in that environment. The j9w.exe starts the application without generationg command line output. In other words, it starts silently. For development purposes, j9.exe is better, while for final sofware releases j9w.exe is probably more indicated.
In order to run applications in the pocket PC, you must always use full path names in your applications. This includes the options and parameters to your java application. The pocket PC and the j9 virtual machie do not understand relative paths. Also, the j9.exe command line cannot exceed 256 characters in length. If the length of the j9.exe parameters exceeds 256, the program execution may not succeed, some classes in the classpath may not be found or some parameters may be missed.
So, try invoking the jar file as j9.exe... Hope this helps.
Thanks, smithuns. Using j9 I can see a console window now (which helps), but I'm wondering about this error message: (is it a problem with the j9 jvm or my program?)
Exception in thread "main" java.lang.UnsupportedClass
at java.lang.ClassLoader.defi
at java.lang.ClassLoader.defi
at java.security.SecureClassL
at java.net.URLClassLoader.fi
at java.net.URLClassLoader$4.
at java.security.AccessContro
at java.net.URLClassLoader.fi
at com.ibm.oti.vm.URLSystemCl
at java.lang.ClassLoader.load
at com.ibm.oti.vm.URLSystemCl
at java.lang.ClassLoader.load
Hi there,
The problem UnsupportedClassVersionErr
Bye for now and have a great day.
Hi missiles,
thats pretty wierd, I would say! It works on PC and Linux, but not on PP! thats strange indeed! Well, its a very small query. You have a certain class in your Java file, isnt it? Well, do the class name and the file name match? In Java, the class name and the file name have to perfectly match for your applications to run. Thats the standard with Java. Else, there are errors like the once youve mentioned. So, please verify this. Might be this is a small error which we have apparently overseen.
Please feed in your progress. Bye for now and have a nice day.
Manifest-Version: 1.0
Created-By: 1.5.0_04 (Sun Microsystems Inc.)
Main-Class: MyViewer
That is my manifest file.
This is a manifest file from another jar file not created by me (which actually works on the pocket pc):
Manifest-Version: 1.0
Created-By: 1.4.1_03 (Sun Microsystems Inc.)
Main-Class: ImageViewer
And I tried recompiling this file with my 1.5 java compiler, and I got the same error message on the pocketpc as before. Do I have to get an earlier version of java to compile programs for J9?
I downloaded and installed the java SDK version 1.4.1_03, compiled my program using that, and that error message goes away! But then I get this one:
Exception in thread "main" java.lang.NoClassDefFoundE
at java.lang.Class.verifyImpl
at java.lang.Class.verify(Unk
at java.lang.Class.initialize
Hi missiles,
Good to see most of the error away. The NoClassDefFoundError is thrown if the JVM or a ClassLoader instance tries to load in the definition of a class and no definition of the class could be found. Ot if the searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found. Just give me some time. Im on my way to work and will post you the solution from there.
ciao and cheers.
Did you try this JDK? It specifically says it supports swing.. http://www.nsicom.com/Defa
Business Accounts
Answer for Membership
by: smithunsPosted on 2005-10-09 at 00:36:30ID: 15047175
Hi missiles,
u/introcs/ 85applicat ion/jar/ ja r.html
Please check your manifest file that resides in the jar file if the contents are okay. If your manifest file is wrong, the jar wont run.
http://www.cs.princeton.ed