?
Solved

Microsoft Java Runtime and CAB vs. JAR

Posted on 1997-08-20
2
Medium Priority
?
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
russgold earned 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
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.
Suggested Courses
Course of the Month12 days, 11 hours left to enroll

777 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