Solved

Microsoft Java Runtime and CAB vs. JAR

Posted on 1997-08-20
2
315 Views
Last Modified: 2013-11-23
I'm currently trying to compress
my application with either jar or cab and was wondering which was the preferred method.  I was
also wondering if either or would work with applications and not just applets. If I have packages in my application, do I need to set up some sort of heirarchy to get them into the cab or jar file?  Or is there another way?  How?  In addition, I wanted
to run the application under the Microsoft Java Runtime without extracting the .jar or .cab file.
There may be a way around it by changing the classpath, but I'm not sure how.  I tried cp:p but didn't have any luck.  Maybe I did it wrong.  Any ideas?
0
Comment
Question by:Jeans
2 Comments
 
LVL 4

Accepted Solution

by:
russgold earned 100 total points
ID: 1225435
CAB files are Microsoft specific, and will not work with other browsers. JAR files are part of the language spec, and should ultimately work with all compliant browsers.   For the time being, you may have to use CAB, JAR, and zip (the method supported by Netscape 3) archives to cover all possibilities.

JDK 1.1 has the ability to find classes in either a zip or a JAR file, so you can certainly use this strategy for applications.

Microsoft Java Runtime behavior is a separate issue and you may want to ask a separate questions; however, I believe that it will  find classes in a CAB file.  Note: to use an archive, the file name - not the directory - should be included in the CLASSPATH.
0
 

Author Comment

by:Jeans
ID: 1225436
Thanks for the quick response.  It helped a bit, but I'm still struggling.  I'm presently trying to run a jar file under Sun's java runtime but am still not sure how to include my packages in the jar file or how to run the file without extracting the class file.  I tried setting my classpath to c:\directory\file.jar;. and then to c:\directory\file.jar\file.class;. but neither method worked.  Part of my question was also how to set the classpath to work.  Any other comments?  Thanks, Jeans
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 92
thymeleaf natural templating vs JSP 2 109
xampp tool 12 52
Facing this issue for maven proxy setting 2 13
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

825 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