Jar 1 « jar « Java I/O Q&A





1. Java: Easiest way to merge a release into one jar-file    stackoverflow.com

Is there a tool or script which easily merges a bunch of jar-files into one .jar? A bonus would be to easily set the main-file manifest and make it executable. The concrete ...

2. Jar file naming conventions    stackoverflow.com

Are there any industry standard conventions for naming jar files?

3. invalid header file while using jar for archiving    stackoverflow.com

When i use this cmd line : jar cmf arshad.mf ars.jar *.class i get this error :

invalid header field name:Manifest-version
This is my manifest file :
Manifest-Version: 1.0
Main-Class:t
i made the manifest file with notepad ...

4. Creating a new file using an existing file within a jar    stackoverflow.com

Let's say I have a file called test.txt within the package "com.test.io" within my jar. How would I go about writing a class which retrieves this text file and then copies the ...

5. java reference file at same level as jar    stackoverflow.com

Fixed the problem with the following code - not the most gracious way - but i need a quick solution for this assignment

package six.desktop.gui.common;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;

public class Config
{
  ...

6. Jar file size differences    stackoverflow.com

I am reorganizing our java code base and wanted to compare our resultant jar files. When I build in the old source tree, I get a jar file size of 3360081. In the ...

7. Obfuscating Jar files with other Jar files embedded    stackoverflow.com

So figure we have a Jar file with our Java application, and it has inside of it the Jar files for the libraries it depends of, a the jdbc or any ...

8. How to get method signatures from a jar file?    stackoverflow.com

I have a third-party jar file that comes with the javadocs for only part of the API. Is there a way to reverse engineer the jar file to obtain a ...

9. what is the best practice to create a .jar file from a java project?    stackoverflow.com

what is the best practice to create a .jar file from a java project??





10. what could modify the SerialVersionUID while serializing and storing in a Jarfile?    stackoverflow.com

I am facing some issues while serializing objects (I am using JBoss Drools, and want to store an ArrayList of KnowledgePackage). When I serialize the list, store the result in a file, ...

11. Modifying a file inside a jar    stackoverflow.com

I would like to modify a file inside my jar. Is it possible to do this without extracting and re jarring, from within my application? File i want to modify are configuration ...

12. Protecting Java jar Files for Distribution    stackoverflow.com

I'm working on an application that I will soon be publicly distributing. I would like to do anything in my power to make sure those who download my program do not ...

13. How to use JarOutputStream to create a JAR file?    stackoverflow.com

How does one create a JAR file programmatically using java.util.jar.JarOutputStream? The JAR file produced by my program looks correct (it extracts fine) but when I try loading a library from it ...

14. Hacker proofing a jar file    stackoverflow.com

What techniques could I use to make my "jar" file Reverse Engineer proof?

15. Verify integrity of JAR files necessary?    stackoverflow.com

I have a zip file containing a number of jar files that is being downloaded from an HTTPS site. The jars form a command line driven, server side application. I have a ...

16. List files inside a JAR file    stackoverflow.com

I have this code which reads all the files from a directory.

    File textFolder = new File("text_directory");

    File [] texFiles = textFolder.listFiles( new FileFilter() {
 ...





17. Jar files for PDF generation through Java    stackoverflow.com

Where can i get the following jar files from-: adobe-livecycle-client.jar adobe-usermanager-client.jar adobe-utilities.jar? How do i download these jar files?

18. Jar file of java    stackoverflow.com

I have created a java application and packed it into a jar file on a Windows platform. Now I wants to deploy that jar file on Debian Linux.

  1. Will the same jar ...

19. Creating a JAR file programmatically    stackoverflow.com

I created a Jar file from my java code :

public void create() throws IOException{
     FileOutputStream stream = new FileOutputStream(this.packagePath);
     JarOutputStream out = ...

20. execut jar file many times and analyse output    stackoverflow.com

I'd like to test which of two implementation in java of a problem is the fastest. I've 2 jar files with the two implementation I can execute from the terminal. I want ...

21. I need some help with using a JAR file    stackoverflow.com

Okay I understand this might be a simple question, but I was trying to figure out how to make a JAR file so that other people can run my program without ...

22. Cyclomatic complexity using jar files    stackoverflow.com

I am working on a project which requires me to find the cyclomatic complexity of Apache ant (Versions 1.1 through 1.6). I have been asked to use the jar files for ...

23. Any way to get a File object from a JAR    stackoverflow.com

I have a JAR file that contains an API that uses external model files. I would like to include the model files in the JAR itself so it easier to ...

24. How to make a Jar file out of a Java Program    stackoverflow.com

I want to design a small Java Program(Swings), Which will take some input as text and after pressing a JButton, creates a jar file in the output.. Hope i have given enough ...

25. Java: Embedding Soundbank file in JAR    stackoverflow.com

If I have a soundbank stored in a JAR, how would I load that soundbank into my application using resource loading...? I'm trying to consolidate as much of a MIDI program into ...

26. Is there something like bsdiff/Courgette for jar files?    stackoverflow.com

Google uses bsdiff and Courgette for patching binary files like the Chrome distribution. Do any similar tools exist for patching jar files? I am updating jar files remotely ...

27. java - reduce external jar file size    stackoverflow.com

still learning, so be patient :) I've developed a module for a Java project. The module depends on external library (fastutil). the problem is, the fastutil.jar file is a couple of ...

28. my .jar file won't do anything    stackoverflow.com

I created a program that more or less holds an array of strings as an object and randomly prints one. so basicaly

class Fun 
{


       ...

29. How do I set maximal jvm-memory (XMX) for a jar-file    stackoverflow.com

How do I set the maximal jvm-memory without adding an extra batch-script to my Programm. Answer is provided below.

30. Moving a Java JAR file to a new machine    stackoverflow.com

I have a Java program that connects to com ports when it's running. All I have is a .JAR file. I recently attempted to move this from a machine that the ...

31. Java code to create a JAR file    stackoverflow.com

What is the Java equivalent to this jar command:

C:\>jar cvf myjar.jar directory
I'd like to create this jar file programmatically as I can't be assured that the jar command will be on ...

32. regarding jar file in java    stackoverflow.com

Hi I want to create jar file in ubuntu linux.Can anybody help me or any link. Thanks

33. Unable to create File object for a file in Jar    stackoverflow.com

I am trying to include a number of text files as resources in my runnable .jar-file. The following code should print the contents of one file:

URI resourceFile = Driver.class.getResource("/etc/inputfile.txt").toURI();
System.out.println("Opening URI: " ...

34. Lotus Domino Designer import 3rd party jar file    stackoverflow.com

I'm developing custom Agent for LotusNotes 8.5. I'd like to use iCal4j jar to convert Calendar issue to ICS format. Question is: how to import coresponding jar in Lotus Agent ?? Now is written ...

35. How can I start and stop a jar file using another jar file?    stackoverflow.com

I want to start and stop a jar file using another jar file or java class. I am able to start the jar file using this command:

Runtime run=Runtime.getRuntime();
Process process=run.exec("java -jar setvalue.jar");
The process ...

36. Command Prompt - jar files    stackoverflow.com

This is how I currently compile my code:

jar cvf client.jar tileGen.class tileGen$GamePanel.class Player.class
Well let's say I have a folder called \line_tile| and i want to put in that jar file all ...

37. Does the size of a jar file affect the performance of the JVM?    stackoverflow.com

I was wondering if the size of jar file has any implications for the peformance of the Java Virtual Machine? Is there going to be a point where the jar file becomes ...

38. JAR file Signature Block Format    stackoverflow.com

I am trying to write my own jar verifier application for BlackBerry. However, as BlackBerry does not have the support of the java.util.jar package, we are left to write the verification ...

39. jar files are deleted on restart    stackoverflow.com

The application we are currently developing has a bizarre issue. Occassionally, all the jar files (except one) are deleted from the lib folder. Has any one seen this at all. I've ...

40. Is a Java JAR file similar to an .Net Assembly?    stackoverflow.com

I'm familiar with .Net and what assemblies are - but sadly my Java knowledge isn't as strong. I know Java and .Net are different "worlds" (possibly like comparing apples with pears) but ...

41. How to make a Mac installer from a jar file?    stackoverflow.com

How to make a Mac installer from a jar file?

42. How to store high score inside a jar file    stackoverflow.com

I am developing a small game in Java and I am shipping it as a single Jar file. I want to store the high scores/best times for that game somewhere. Instead ...

43. Using a .jasper file present within a jar file    stackoverflow.com

We are using jasper reports as our reporting tool. Earlier we were using relative paths for jasper files for filling report and it's working fine. Now, we want to create a new jar ...

44. How can I get the function sinatures from a jar file?    stackoverflow.com

In Eclipse or NetBeans, when you "control + click" into a function, you can at least see its entire signature, even if it's in a jar file. I am wonderging if it's ...

45. Comparing two .jar files    stackoverflow.com

How do I compare two .jar files? Both of them have compiled .class files. I want the difference in terms of method changes, etc.

46. how to import a .Jar file in Java Script    stackoverflow.com

I want to import a .Jar file in Java Script, there is a Class in the Jar file which i want to use in Java script,and here is a code i found ...

47. how to add files to jars META-INF    stackoverflow.com

i want to create a jar file in which i want to place some file in the META-INF folder of the jar file.is it possible ? .i know how to create ...

48. Call a HTML File From Jar    stackoverflow.com

Im generating a report from a template html file in my program. It resides in /src/main/resources and its name is "template.html". Im using ClassLoader inside the code like this:

   ...

49. Generating a UTF-8 file from a jar-File    stackoverflow.com

I want to create a UTF-8 file from a jar-file with the following code:

public class UTF8 {
 public static void main(String[] args) throws Exception {
  BufferedWriter out = new BufferedWriter(new ...

50. Profiling a jar file remotely?    stackoverflow.com

Is there any profiler available in the java environment which can be used on a remote machine? I have a .jar file(plain java code,nothing fancy) running on a remote machine and I ...

51. Jar file name form java code    stackoverflow.com

I would like to determine the jar file name from my java code. I found many solutions in the google, but nothing works. Just to see what I tried here is ...

52. Exporting Project into a Runnable JAR File with PDF document    stackoverflow.com

I have project that I created and it contains a help button that opens a .pdf file with my documentation. The code for the button is the following

URL loc = Actions.class.getResource("Documentation/test.pdf");
 ...

53. Save something into JAR    stackoverflow.com

I have a java app, that needs to save and load user settings. I want to save them in a file located in the JAR file, how could I achieve this? ...

54. Is there any third party jar files available for java6 math evaluation?    stackoverflow.com

I want to calculate mathematical expression in java6.for example,

c=a*b+((b/d)-c)/100-(h/2)
How to evaluate this math expression.... Please guide me get a solution... Saravanan.P

55. Passing file args in a bash    stackoverflow.com

The bash script is supposed to do one and one thing; ie; feeding the list of file names one after the other separated by a space to the jar file. Here ...

56. Java questions CSV/batch/js in jar    stackoverflow.com

i have multiple questions here that may sound annoying...

  1. What is batch processing in java is it related to .bat files and how to write batch files?
  2. How to read CSV files in ...

57. Java - Which version was a .jar file built too?    stackoverflow.com

Is there a way to find out the jdk version used to build a .jar file? I don't have any other information at the moment. Thanks in advance (even if the answers ...

58. Excel file getting corrupted inside jar    stackoverflow.com

We are using a j2ee system and the excel file when we are jarring up is getting corrupted. We are using Maven script to jar it up. Any suggestions/ideas?

59. How to correctly make a java jar file using this makefile with files in src/ and bin/    stackoverflow.com

I am having trouble correctly generating a Jar for my Java implementation. I am not a Java master ( Thus why I am using Make and not Ant). I didn't think ...

60. Java creating .jar file    stackoverflow.com

I'm learning Java and I have a problem. I created 6 different classes, each has it's own main() method. I want to create executable .jar for each class, that is 6 ...

61. java - listing all files in the jar of webstarted application    stackoverflow.com

Given a webstart application composed of multiple jars, how could I list the files contained in these jars? (at runtime) Thanks in advance, Arnaud EDIT: The problem, with the method mentionned below (which is very ...

62. How to add/reference .jar files in your project when you don't have an IDE    stackoverflow.com

I am new to Java (basically a LAMP developer). I got this JAVA API to parse .pst files and show all the inbox messages. I tried executing a given .class file ...

63. Is it possible for a Java JAR file to damage your system and how can you check what it's doing?    stackoverflow.com

I want to evaluate a software solution where multiple people have submitted JAR files to perform a task on Windows. Is it possible to check whether the JAR file performs any additional ...

64. ImageJ jar file plugin shortcut creation    stackoverflow.com

I have been working on a developmental biology project marking various nuclear markers along with a DAPI stain to determine percentage of marker expression. I have found that the ImageJ plugin ...

65. Nested jar files    stackoverflow.com

a question on building executable jar files. Suppose we have a jar file a.jar that contains UI.class. I have used a metafile in archiving a.jar that says

Main-Class: UI
Class-Path: . b.jar c.jar
Now, ...

66. Jar and File I/O    stackoverflow.com

in my Java project i have some propertie files in a folder src/properties. When running the application in eclipse loading and saving the file with the following code is no problem: ...

67. How can i edit a .jar file?    stackoverflow.com

So i have a jar file with one .class file on it i just need to change some worlds in it What program do i need to use? I want this to work ...

68. Is it possible to embed a jar file inside a flex application?    stackoverflow.com

I have a great idea and I want to build a flex application around a .jar file. Is there a way I can go by embedding a jar file into the ...

69. looking for jar file that contains JuiCEProviderOpenSSL    stackoverflow.com

Does anyone know about the container jar file for the class given below. Please send me the link.... org.apache.security.juice.provider.JuiCEProviderOpenSSL or any other work around for this issue

java.lang.ClassNotFoundException: org.apache.security.juice.provider.JuiCEProviderOpenSSL
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 ...

70. Should jar files be compressed for desktop applications?    stackoverflow.com

Just wondering, if it is generally a good idea to compress jar files that will be shipped with a desktop application (no network access to jars), of if the decompression will ...

71. I need some help concerning using 2 jar files in Java    stackoverflow.com

Well I have 2 .jar files. The main jar file is the jar file for my whole project and the other .jar file being the MySql JDBC Connector. Well basically whats happening ...

72. JAXB jar files incompatible with java 1.6.0?    stackoverflow.com

I'm new to JAXB...I want to marshal and un-marshal XML/Objects to Objects/XML..
I have downloaded JWSDP 2.0 from (worth 22.69 MB) Sun's site..
i have set Environment variables as JAVA_HOME :- ...

73. What is the use of rt.jar file in java?    stackoverflow.com

I am very confused to knowing about rt.jar file.

What is the role of rt.jar file or use of rt.jar file in java??
Thanks.

74. 2 .jar files not interacting with each other    stackoverflow.com

I have recently been adding an updater to my Java programm and all the code is working. The problem I am having however is that the initial program doesn't go ...

75. Java Imports to Jar file    stackoverflow.com

My question is this is there a way to put all the Java Imports in a jar file, so when you make a Java Program no need to import the files ...

76. Java won't recognize file in JAR    stackoverflow.com

I have a .csv database file inside my java program's JAR file. The program works fine in NetBeans IDE before I package it, but once I do, it refuses to believe ...

77. Packing files as jar file    stackoverflow.com

I am trying to create a jar file off of a class and xml file I have in a directory called SOACustomFunction.

OS: Windows 7 Enterprise - 64 Bit
Java: jdk1.6.0_21
I tried using ...

78. When were JAR files first created?    stackoverflow.com

When were JAR files first created? Was that in Java 1.0 or a later edition?

79. Create a jar file from the java code    stackoverflow.com

i want to create a jar file from java program i looked at some examples Java code to create a JAR file but it didnt impressed me as this will ...

80. How to check existence of a JAR file and a specific file inside JAR?    stackoverflow.com

Assume the file name is in this URL:

URL file = new URL("jar:file:/path/to/foo.jar!/META-INF/file.txt");
This operation leads to IOException if there is no foo.jar or there is no file.txt inside the existing jar:
import org.apache.commons.io.FileUtils;
FileUtils.copyURLToFile(file, ...

81. How to export jadex agent into jar file?    stackoverflow.com

Any one got the idea how to export a jadex agent file become a jar file which can run in any pc? let us use the example in jadex, how we export ...

82. Using png in a jar file    stackoverflow.com

When I run my jar file, i get a javax.imageio.IIOException: Can't read input file! But the file is in the jar! the code:

try {imgs.put("player1" , ImageIO.read(new File("/car1.png")));}
    catch (IOException e) ...

83. how to use cobertura code coverage tool with jar file    stackoverflow.com

I'm using cobertura to find out code coverage of my test suite, which tests a java based solution bundled through a jar file, cobertura cmd line reference I have done ...

84. Need Help in the Creation of Jar File through Java Command?    stackoverflow.com

I need to create jar file of my java app. For that first i had created a file called Manifest.MF , in that file i had stored the following code

Manifest-Version: 1.0
Main-Class: ...

85. Searching a file in a jar    stackoverflow.com

I have a directory containing jar file's ,now i want to search a particular file say log4j.xml which is contained in some jar in that directory.I am not getting how to ...

86. Specifying JVM arguments when calling a jar file?    stackoverflow.com

I want to specify some JVM arguments when calling a jar file like so:

java -jar filename.jar
I assumed I did it like so:
java -Xms256m -Xmx512m -Djava.awt.headless=true jar filename.jar
But this doesn't seem ...

87. .Jar file in JS    stackoverflow.com

does any knows how to access .jar file in JS. I have created class in Java and imported as a jar file and I want to access that class from JS ...

88. Programatically associating file types with .jar file    stackoverflow.com

I know how to manually associate a file type with a .jar file:

assoc .ext=filetype
ftype filetype="C:\Program Files\Java\jre6\bin\javaw.exe" -jar "path\to\jar\file\YourJarFile.jar" "%1"
I'm currently using Runtime.exec() to try to do these commands, but I'm getting ...

89. special characters display proper in Java IDE, but not in program launched from jar file    stackoverflow.com

I'm trying to build a Chinese flashcards program in Java to help myself learn Chinese. I'm using intelliJ IDEA 10. The basic process is that my program will read a file ...

90. Save files in .jar    stackoverflow.com

I have a couple files I want to include in my .jar for a game server. The files, a SQLite database and an icon, work properly when and only when I ...

91. How to make a file using UNICODE like Jar files?    stackoverflow.com

I just want to know if this is possible to jar files? thanks!

92. Modifying a .JAR file via a C++ Program?    stackoverflow.com

I'm making a program that needs to insert .CLASS or image (.PNG) files into a .JAR file, or read what files are inside. The problem is, I have no idea where ...

93. ServiceRegistry.lookupProviders locking jar file    stackoverflow.com

I have a WebApp project on netbeans that uses various other java library projects. This WebApp publishes several webservice. The 'sun-jaxws.xml' is dynamically build in a ServletContextListener implementation for the WebApp. To ...

94. Setting jar file in environmental variables    stackoverflow.com

My jar file is available in E:\ So How to add jar file to environmental variables now?

95. Searching Docx files in java    stackoverflow.com

I am writing an application for searching the Content of Documents i have already written the code for searching the documents which are editable by notepad. I also wish to do the same ...

96. Input/output help with a .jar in Java?    stackoverflow.com

Feel free to jump to the tl;dr. This is how my usual experience with my .jar is, in command: java -cp test.jar test q a o to open the jar Next, something like UF UD UR ...

97. How do I clear a specific file in the Java cache?    stackoverflow.com

I would like to remove a specific cached jar file from a Java program. Java cache behaves weirdly sometimes, and keeps loading an old jar even if a new one ...

98. How to override a method in a jar file?    stackoverflow.com

I have a method in a class and a jar file is created using this class. The jar file is included in the project. How can I override this method in ...

99. Gradle - jar file name in java plugin    stackoverflow.com

I am trying with Gradle first time. I am trying with a maven java project to compile and create a jar file. It is compiling and creating the jar file in ...

100. Jar file not working correctly    stackoverflow.com

I create .jar file in eclipse. I use .jar file to print text on pos printer. My program is printing correctly, but when I start .jar file is not connecting with ...