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.NoClassDefFoundE
rror: javax/microedition/mi
dlet/MIDlet
at java.lang.ClassLoader.defi
neClass0(N
ative Method)
at java.lang.ClassLoader.defi
neClass(Un
known Source)
at java.security.SecureClassL
oader.defi
neClass(Un
known Source)
at java.net.URLClassLoader.de
fineClass(
Unknown Source)
at java.net.URLClassLoader.ac
cess$100(U
nknown Source)
at java.net.URLClassLoader$1.
run(Unknow
n Source)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at java.net.URLClassLoader.fi
ndClass(Un
known Source)
at java.lang.ClassLoader.load
Class(Unkn
own Source)
at sun.misc.Launcher$AppClass
Loader.loa
dClass(Unk
nown Source)
at java.lang.ClassLoader.load
Class(Unkn
own Source)
at java.lang.ClassLoader.load
ClassInter
nal(Unknow
n Source)
also I tried
C:\myGen>java myFile.class
Exception in thread "main" java.lang.NoClassDefFoundE
rror: 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