Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Zipping classes in packages

Posted on 1997-05-07
4
Medium Priority
?
234 Views
Last Modified: 2010-04-16
My applet is a bit large, about 120k.

So I'm trying to create ZIP, CAB and JAR files for it.

My package structure looks like:  myOrg.appname.modules
Where I have two "modules" packages, with the applet class
sitting at the myOrg.appname level.

My code parameter is:  CODE="myOrg.appname.myApplet.class"

I've created a working CAB file, that was easy.

I'm having trouble with the the ZIP format.  Using
PKZIP for windows I've tryed storing the class files in the Zip file, without and without relative path names to the
base of my package tree.

When I load the zip file with Netscape Nav, it says "Applet can't start: class myOrg.appname.applet.class not found".  
Does anyone know why?  Has anyone had some experience using the ZIP format with packaged classes?

No, I'm not compressing the class files when I Zip them.

Thanks in advance.
Gerry Rempel
grempel@acm.org
0
Comment
Question by:gerry99
  • 2
4 Comments
 

Expert Comment

by:pedxing
ID: 1220222
Which version of PKZIP?  Does it handle long filenames?

0
 
LVL 1

Author Comment

by:gerry99
ID: 1220223
I'm using Pkzip 2.50, 32-bit version for windows.  It handles long file names.

0
 

Accepted Solution

by:
ddyer earned 100 total points
ID: 1220224

use winzip32 rather than pkzip, point at the root of your java
hierarchy, and use "add with wildcards".  The files in the
archive should have pathnames with the same components as
fully qualified class names; if your class is foo.baar.*
the classes should shop up in winzip as foo\bar\

There's a nifty java package called "greenbay" which
does the right thing, and is easier to use than zip
- you just feed it the packages you want archived.
Find greenbay by searching dejanews

0
 
LVL 1

Author Comment

by:gerry99
ID: 1220225
Thanks for the advice.

Winzip32 is easy to use for this task.

I think my fundamental problem may have been that I was spelling
"archive" as "arhive".

I couldn't find any reference to this "greenbay", however I'll be fine using winzip.

Gerry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question