corrupt jar file

Discuss all aspects of programming here.

Moderator: The Mod Squad

corrupt jar file

Postby cwl157 » Thu Jan 06, 2005 3:03 pm

i followed the steps from the tutoriial to make a jar file and it creates it fine. However, when i try to open it it says its corrupt and doesnt open this is the error i get when i dont make a manifest file. When i try to create the jar file with a manifest it gives the the error message "failed to loadMain-Class Manifest attibute." What is wrong is there a file missing or something?
cwl157
Black Belt
Black Belt
 
Posts: 851
Joined: Mon Apr 12, 2004 2:32 pm
Location: Chicago

Postby olly » Thu Jan 06, 2005 3:08 pm

What exactly do you mean by "try to open it"?
olly
Green Belt
Green Belt
 
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Postby cwl157 » Thu Jan 06, 2005 3:09 pm

like when i double click on the file to open it.
cwl157
Black Belt
Black Belt
 
Posts: 851
Joined: Mon Apr 12, 2004 2:32 pm
Location: Chicago

Postby olly » Thu Jan 06, 2005 3:11 pm

Jar files are like rar or zip files. You need to extract them with something like winrar
olly
Green Belt
Green Belt
 
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Postby cwl157 » Thu Jan 06, 2005 3:16 pm

o duh im so stupid cause it said executable i think so i thought i could just run it. My Bad :oops:
cwl157
Black Belt
Black Belt
 
Posts: 851
Joined: Mon Apr 12, 2004 2:32 pm
Location: Chicago

Postby olly » Thu Jan 06, 2005 3:20 pm

cwl157 wrote:o duh im so stupid cause it said executable i think so i thought i could just run it. My Bad :oops:


I'm still a novice with jar files myself, but this is from my teacher:

A useful technique for organizing class files is to combine them into a single file called a JAR or Java Archive. A JAR file is simply a ZIP compatible file containing a collection of java files (typically, class files, but any other kind of file could be included as well). You can pack a component or a complete application in a single file. Additionally, you can make an GUI application run direct from the JAR file without the console window.


IIRC You just have to import the packages you put in your jar in order to use those classes in future 8)
olly
Green Belt
Green Belt
 
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Postby Toby B. » Thu Jan 06, 2005 11:57 pm

Interestingly enough I found two infected files on my PC the other night. Both of them being .jar files...
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby olly » Fri Jan 07, 2005 1:57 am

Toby B. wrote:Interestingly enough I found two infected files on my PC the other night. Both of them being .jar files...


Yes I wouldn't have imagined Java to be the virus writers language of choice.

PS Long time no see Toby. The programming forum brought me back :wink:
olly
Green Belt
Green Belt
 
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Postby Toby B. » Fri Jan 07, 2005 2:02 am

PS Long time no see Toby.
Ditto. Glad to see that you decided to stop back in.
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest