Solved

Microsoft Java Runtime and CAB vs. JAR

Posted on 1997-08-20
2
312 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
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 will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

708 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

17 Experts available now in Live!

Get 1:1 Help Now