Advertisement

11.10.2005 at 10:25PM PST, ID: 21627361
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

How to run Jar files.....

Asked by imarshad in Java Programming Language

Tags: , , ,

Hi all,
        I have been given a JAR file that is supposed to run. I have got no experience what so ever with Java. I want to know how to run this file???? Following is what I have already tried .....

java -jar myFile.jar
Failed to load Main-Class manifest attribute from
myFile.jar

Then I unzipped the Jar file with WinRAR and then found the following files in the archive.....

icon.png
logo.png
scroll.png
intro.midi
myFile.class
gfxcanvas.class
META-INF (Folder with the file MANIFEST.MF)

Now I tried to execute the class files using the following code.....

C:\myGen>java myFile
Exception in thread "main" java.lang.NoClassDefFoundError: javax/microedition/mi
dlet/MIDlet
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

also I tried

C:\myGen>java myFile.class
Exception in thread "main" java.lang.NoClassDefFoundError: myFile/class

and here is the MANIFEST.MF file if it helps.....

Manifest-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MIDlet-Name: myFile
Created-By: 1.4.2_03 (Sun Microsystems Inc.)
MIDlet-Vendor: Sun Microsystems
MIDlet-1: myFile, icon.png, myFile
MIDlet-Version: 1.0
MicroEdition-Profile: MIDP-2.0


Can someone suggest some way to run this program???? How can I be sure that this is some bogus file that cant be run?????

Imran
Start Free Trial
[+][-]11.10.2005 at 10:27PM PST, ID: 15271761

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: run, jar, how, files
Sign Up Now!
Solution Provided By: objects
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.10.2005 at 10:30PM PST, ID: 15271767

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 10:36PM PST, ID: 15271783

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 10:37PM PST, ID: 15271787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 10:48PM PST, ID: 15271812

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 11:11PM PST, ID: 15271855

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32