Questions tagged [jar]

Questions about the Java Archive (JAR) package file format.

A JAR (Java ARchive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file for distribution. JAR files are archive files that include a Java-specific manifest file. They are built on the ZIP format and typically have a .jar file extension.

76 questions
70
votes
9 answers

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can be tedious. Is there a utility or shell script…
austin
  • 968
  • 1
  • 6
  • 9
48
votes
5 answers

Can you configure Windows to open JAR files like ZIP files without a 3rd party tool?

I'd like to be able to examine the contents of a JAR file without having to install Winzip or some other tool and without having to rename the file. Windows Explorer can open ZIP files just fine; is there some registry setting I can use to let it…
jodonnell
  • 615
20
votes
7 answers

How to pin an executable jar to start in Windows 10?

I tried creating a normal shortcut, and a javaw.exe shortcut, which creates the context menu option "Pin to Start", but that does nothing.
15
votes
2 answers

How to replace a file in jar with command line in linux?

I have a jar, and I need to replace a class in it, at this moment, I can only open it with "archive manager" and then drag and drop the new compiled class into the jar, but I think this is really boring, if I can do with with just a command ? Thanks…
Foolish
  • 1,969
12
votes
4 answers

What is the best way to browse the contents of a jar file on the Mac platform?

What is the best way to browse the contents of a jar file on the Mac platform? I usually use unzip foo.jar -d foo, but this is too slow with uber-jars.
11
votes
3 answers

How to search for a file in war,ear and jar files recursively in Linux

I need to search for a file (logo.png), in a folder that contains war, ear, and jar archive files. Can anyone help me with the command?
ashok_p
  • 213
9
votes
2 answers

Editing a .jar with `vim`

On an Amazon Linux instance I'm trying to edit a jar file remotely through putty. vim provides a convenient navigator, which displays a prompt with a list of the contained files in the jar: > vim filename.jar " zip.vim version v22 " Browsing…
ile
  • 213
8
votes
2 answers

How do I easily elevate when running a .jar file?

When trying to run an installer Jar file, I am getting an error saying that write access is denied to create a directory under the Program Files folder. Right click -> Run as Administrator is not available on Jar files (I assume because it is…
Merlyn Morgan-Graham
  • 1,752
  • 4
  • 20
  • 26
7
votes
3 answers

"file.myext" is not a valid Win32 application

I have written a registry that creates .myext. Double-clicking on my file.myext refers to my executable file (converted from a batch file that opens a .jar) which then opens my notepad application. The registry Windows Registry Editor Version…
anon
7
votes
5 answers

Unable to run .jar files by double-clicking them on Windows 7

Running a .jar file in the command line works fine, but I am unable to execute .jar files on my PC by double-clicking them. What is interesting, the same .jar files successfully execute on my laptop with a double-click. I included %JAVA_HOME\bin and…
bobasti
  • 184
5
votes
2 answers

Shell Script to Start and Stop an Executable JAR in Linux Environment

I have to write a start and stop script for an executable jar (e.g., executable.jar). How to do it using shell scripting? I got success to do it for Windows environment with .bat file. But not able to manage to write a shell script for same.
5
votes
2 answers

How do you remove META-INF from minecraft.jar without any manual file deletion?

How can I remove META-INF from minecraft.jar, without administrator privileges? I can't install new software.
rookis 47
5
votes
1 answer

Windows' "open with" with java and a jar file

I use the rest-client to test REST APIs. It is basically just a .jar file, that is called via java -jar rest-client.jar. The rest-client uses two file extensions, in my case .rcq, to store data in files. I want to let the explorer open .rcq files…
Boldewyn
  • 4,468
5
votes
1 answer

why doesn't `find . -name '*.jar' | xargs jar tf` work?

I ran this find . -name '*.jar' | xargs jar tf hoping it would, find all the .jar files and execute jar tf on them (to view the content). But it didn't seem to work!!!
3
votes
2 answers

use pipe inside a find exec statement

I'm trying to find which jar contain a class, I wrote the below, which doesn't seem to work any ideas? find -type f -name "*.jar" -exec jar -tvf "{}" \| grep MyClass \; -ls
Charbel
  • 379
1
2 3 4 5 6