Jesper de Jong wrote:The JAR tool does compress files, similar how to ZIP works.
However, some file types just don't compress very well. AVI is a container format for video. The video itself inside an AVI can have different formats, and many video formats already store frames in a compressed format. Trying to compress such a file again with the JAR tool, or any other compressing archive tool, will not compress the file much more.
If you really want to make your video file smaller, you should re-encode it with a lower frame rate or lower resolution. That will ofcourse lower the quality of the video.
Jesper de Jong wrote:The JAR tool does compress files, similar how to ZIP works.
However, some file types just don't compress very well. AVI is a container format for video. The video itself inside an AVI can have different formats, and many video formats already store frames in a compressed format. Trying to compress such a file again with the JAR tool, or any other compressing archive tool, will not compress the file much more.
If you really want to make your video file smaller, you should re-encode it with a lower frame rate or lower resolution. That will ofcourse lower the quality of the video.
Jesper de Jong wrote:The JAR tool does compress files, similar how to ZIP works.
However, some file types just don't compress very well. AVI is a container format for video. The video itself inside an AVI can have different formats, and many video formats already store frames in a compressed format. Trying to compress such a file again with the JAR tool, or any other compressing archive tool, will not compress the file much more.
If you really want to make your video file smaller, you should re-encode it with a lower frame rate or lower resolution. That will ofcourse lower the quality of the video.
Comal Rajagopalaratnam Muthukumar wrote:i still want to know why i am not able to make a jar file using the interface for an application prg though the same is
executing well with output on using java command
Ulf Dittmer wrote:You can't attach jar files here, only image files.
Comal Rajagopalaratnam Muthukumar wrote:i still want to know why i am not able to make a jar file using the interface for an application prg though the same is
executing well with output on using java command
I don't understand what you're asking, particularly the "interface for an application" part. Are you trying to make a single jar file which contains your classes, and the JMF classes, and which when double-clicked runs your code?
The class files are in the jar JMFPlayer.jar that i forwarded through attachmet path of the forum with option
It is here i need help as to how to make ny jar an excutable one
Ulf Dittmer wrote:
It is here i need help as to how to make ny jar an excutable one
You need an appropriate manifest entry that points to your class. Start here: https://coderanch.com/how-to/java/JarFiles
Comal Rajagopalaratnam Muthukumar wrote:C:\j2sdk1.4.1_01\bin>java -jar JMFPlayer.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/Controlle
rListener
Ulf Dittmer wrote:Your code uses the javax.media package, which is not part of the JRE; you'll have to distribute it along with your own jar, and add an entry to the manifest.
Apart from that, it seems that the jar file you created is a bit of a mess - it includes the class files twice, once in the correct package directory, and once in some other invalid directory. It also seems to include an older version of itself. While these may not be actively harmful, I would advise not to include anything that you don't need.
Jesper de Jong wrote:
Comal Rajagopalaratnam Muthukumar wrote:C:\j2sdk1.4.1_01\bin>java -jar JMFPlayer.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/Controlle
rListener
You have not set the classpath correctly in your executable JAR file. You'll need to include all necessary libraries in the classpath, by setting the 'Class-Path:' attribute in your executable JAR file's manifest files. It's explained in detail here: Adding Classes to the JAR File's Classpath
By the way, is there a specific reason why you are using a very old version of Java (version 1.4.1)? I'd recommend upgrading to the current version (Java 7) if you can.
I love a good mentalist. And so does this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|