Solved

Zipping classes in packages

Posted on 1997-05-07
4
220 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 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now