?
Solved

Microsoft Java Runtime and CAB vs. JAR

Posted on 1997-08-20
2
Medium Priority
?
330 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

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 first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

649 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