954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

zip files instead of jar

Hello,

Attempting to run java app from zip file rather than jar but having some difficulty. I have placed all the classes for the app in the zip. The files not are compressed. Here's a sample of the code:

'the following tries to run Main.class. Also, tried calling app name
cvm.exe" -Xbootclasspath/a:"\Storage Card\database\jsr169.jar" -Djava.class.path="\Storage Card\Myclasses.zip" Main  

'Error rec'v
java.lang.NoClassDefFoundError: Main (wrong name: MyApp/Main)


any help is appreciated.

wrappingduke
Newbie Poster
17 posts since Jul 2008
Reputation Points: 10
Solved Threads: 2
 

Try "MyApp.Main" instead of just "Main". It looks like Main is in a package called MyApp.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

hello,

thx for reply. it's appreciared. i've tried what you suggested and I ended up w/ the same error.

Myapp is the name of the app.

any help is appreciated.

wrappingduke
Newbie Poster
17 posts since Jul 2008
Reputation Points: 10
Solved Threads: 2
 

hi,

I think I may have the error. I placed the classes in a folder named "myapp" before zipping and that appears to have done it.

thx again.

wrappingduke
Newbie Poster
17 posts since Jul 2008
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You