We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [jar]

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

Filter by
Sorted by
Tagged with
47
votes
8answers
57k views

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 ...
39
votes
4answers
30k views

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 ...
11
votes
2answers
38k views

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 ...
10
votes
3answers
28k views

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?
9
votes
4answers
18k views

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.
8
votes
2answers
15k views

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 ...
7
votes
3answers
2k views

“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. ...
7
votes
2answers
8k views

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 ...
5
votes
2answers
29k views

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.
5
votes
1answer
5k views

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 ...
4
votes
5answers
18k views

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 ...
3
votes
2answers
7k views

Finding which jars contain a file

With Windows XP, I recall being able to using Windows Search to find which jars in a dir contain a specific class file. But on Windows 7, this no longer seems to work. I've got the Search option ...
3
votes
2answers
34k views

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 ...
3
votes
1answer
418 views

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
2answers
580 views

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
2
votes
3answers
14k views

How can I use Task Scheduler to schedule a .jar file?

I have an executable jar file and I am trying to create a scheduled task for every day using windows Task Scheduler I go through the following steps: open Task Scheduler -> Create Basic Task -> ...
2
votes
2answers
119 views

Is it possible to install software in such a way that the user can't remove it?

Let's say a program is contained entirely in a jar or exe. Is it possible for this program to propagate itself such that the user can't possibly remove it from the machine? I'm wondering how much ...
2
votes
1answer
5k views

How to Simulate Jar files on PC

Sometimes it happens that after downloading a Jar file for an App, there appears to be several catch with it, like activation code required. Is there any tool that I can use to simulate the Jar file ...
2
votes
1answer
3k views

Is there a Midlet emulator that emulates custom screen sizes, reading from flash card, web access, camera and bluetooth?

I have a lot of Midlets (Java apps, *.jar, for mobile phones) and I would like to test in my computer before using on my mobile. There are some programs (like MidpX) that can emulate some of them, ...
2
votes
1answer
1k views

How do I delete the meta-inf folder in minecraft.jar?

When I open the minecraft.jar file with p7zip on Linux, I can't delete the META-INF folder. This is the error: Error: /home/davide/.minecraft/bin/minecraft.jar is not supported archive System ...
2
votes
2answers
807 views

How to get a specified file extracted from a JAR file using a batch file?

I have a test.jar file on windows and I want to use 7-zip to get a certain file from outside of the archive, such as the "com/app/test/FILE.class" file. I only have access to java, 7-zip, and the ...
1
vote
2answers
207 views

Windows 10 how to create a command line program

I've just downloaded swagger-codegen-cli (doesn't matter what it is, it's just an executable jar) in a Windows 10 OS, which runs from the command line. So to execute it I must go to the corresponding ...
1
vote
1answer
3k views

How to make a java jar file to be a single file executable?

I have a jar file with a main class in it. The main class is already configured in the manifest file, meaning the jar can be executed in the following way: java -jar Main.jar I'd like to make it ...
1
vote
2answers
1k views

How do I run this JabRef JAR file I downloaded?

I downloaded a jar file from here. But - I don't know how to get it to run. Here's the error I get: $ java -jar /path/to/JabRef-4.1.jar Error: Could not find or load main class org.jabref.JabRefMain ...
1
vote
2answers
2k views

How to stop a running jar file in a bash script after 5 minutes and start the next one?

I have to run a jar file with different parameters like this: #!/bin/bash cd /Users/hawkarhama/Desktop/RUN echo $(java -jar IPM.jar 0 20 3 sign.txt) echo $(java -jar IPM.jar 1 20 3 sign.txt) echo $(...
1
vote
1answer
2k views

Installing a Java Jar file on Ubuntu 11.10

Is there a way to package a jar file (for example, a .deb) and install it on Ubuntu 11.10. Basically I want to automate the installation of Jar file when I create a Ubuntu VM (using KVM). Thanks.
1
vote
1answer
2k views

Why it is impossible to delete entries from jar file?

It is possible to add new entries to jar file using jar tool. It is possible to modify some entries in jar file using jar tool. But it is impossible to delete some entries from jar file. Why?
1
vote
1answer
467 views

executing a .jar

I have a simple .jar file, when i run this: >java -jar SLA.jar It works correctly, however when i run >SLA.jar Nothing happens at all, i thought that these were meant to be the same the same....
1
vote
1answer
92 views

Problems in building a Github Java project

This is a follow-up question from my previous question. I was initially trying to just install and run with the executables, but now I am trying to build the project located at: https://github.com/...
1
vote
2answers
2k views

Corrupt usr/bin/java

I just did a pretty stupid thing, when I tried to copy JSTestDriver.jar into usr/bin/java by typing this command: cp jsTestDriver.jar usr/bin/java. Now every 'java' command in terminal just prints ...
1
vote
1answer
349 views

Eclipse with JAR - Classpath on OpenSuse 12.1

howdy! well i am brandnew to eclipse - i never ever used it so far! i run a OpenSuse Linux Version 12.1 - and all works fine. i am currently tryin to install the OSMGenerator - a tool that allows ...
1
vote
1answer
4k views

I can not start a .jar-file by double-clicking, only from command-line in Windows

I have a Java application in a .jar-file. I can start it by typing java -jar myapp.jar and the application starts, but if I double-click on the .jar-file, nothing happens. What can be wrong? How can I ...
1
vote
1answer
49 views

Can’t open “.jar” files after Java update on macOS

Ever since I updated my Java version (around 3 updates ago) it stopped opening .jar files on my computer. I get a pop-up that says: “The java jar file could not be launched check the console for ...
1
vote
0answers
142 views

How do I export a JAR without all the project files (just the src) in Intellij?

I'm currently using Eclipse as the IDE for a project but I'd like to work with intellij. When I export this project in Eclipse, I get the standard jar (its size is about 80MB). When I try to make an ...
1
vote
1answer
678 views

Run artifact (.jar) in Eclipse after Maven build success

I'm working on a Maven project, and after resolving many configuration problems, finally I am able to build the project successfully in Eclipse. After selecting maven install and seeing build success, ...
1
vote
0answers
3k views

How to run .jar file on Mac 10.11 without installing Java?

So I made an application using Java swing and converted it to a .jar file and would like to share it with my friend. However, he is not a programmer so his computer needs to install Java bloatware to ...
1
vote
0answers
72 views

Export files directly into the jar

How would I go about exporting the files directly into the jar, instead of it in a directory? For example, here's my project tree: project name src folder package Java class ...
1
vote
2answers
453 views

Jar file opens with internet explorer

I downloaded Optifine, it's a jar file, after that i installed Java to install optifine with the jar file, but the jar file opens with internet Explorer prompting me to download the file again. This ...
0
votes
1answer
6k views

Adding a jar file to CLASSPATH is still not executable

Perhaps I just don't understand how the whole CLASSPATH environment variable works when trying to find .jar files on your system. I thought if you specified it, you could launch .jar files with java ...
0
votes
2answers
1k views

Ubuntu Package (.deb) Recommendations Installation Folder and Binary Name

I'm building a .deb file for an executable jar I've built for myself. I got a .deb built and installed my program to /usr/bin. As I have a jar I now had an executable file called /usr/bin/...
0
votes
4answers
17k views

Java .jar files to run on double-click

How can I configure .jar files run on double-click in Windows 7?
0
votes
1answer
458 views

Problems with running jar files

Introduction. I love Minecraft. So I want to play it with my friends. I downloaded minecraft_server.jar file, but when I run it I see "A Java Exception has occurred." When running other jar files, ...
0
votes
1answer
508 views

Command-line to run executable JAR with configuration

How to run the executable JAR file with a specific configuration? My code can be run in Eclipse with the run configuration " 9001 12.123.23.43 9001 " Now export the executable jar file and hope to ...
0
votes
1answer
1k views

Where is the Java Jar icon located?

I'm trying to find what dll or folder the jar icon for Java is located in. it looks like I'm referring to the complete icon you see in the picture, complete with the paper backing. I've already ...
0
votes
3answers
7k views

Can not open “.jar” file in windows 8

I downloaded a jar application named Need for speed most wanted. I double clicked on the jar file icon, however it did not execute. I checked I have jre installed in my windows 8 (64 bit) machine in ...
0
votes
1answer
112 views

Copying Jar files into single zip file

I am trying to compress the hundreds of jar files into a single zip file that can be transferred to a different location. Please help.
0
votes
1answer
5k views

Can't change default .jar opener from Command Prompt to Java SE Binary

A while back I changed my default opener for .jar files to cmd, as I was writing a few console applications in java and wanted to be able to run them easily (I now know that you can a similar result ...
0
votes
1answer
3k views

unable to access jarfile alliance.tmp

I've just installed the p2p software Alliance. Whenever I'm trying to open Alliance a "Java Virtual Machine Launcher" window pops up with this error message: "unable to access jarfile alliance.tmp". ...
0
votes
1answer
23 views

How do I output content of specific file from zip achrive by `jar:` URL in Linux?

Given URL like jar:file:///path/to/some/file.jar/path/inside/zip/hello.txt, how do I uncompress and output specified file from specified archive automatically? A script using unzip or jar or 7z can ...
0
votes
1answer
19 views

When I open Java, .jar files are not opened

I have installed the latest version of Jave, but when I run it, the command line screen comes and goes immediately. I am using Windows 10. What can I do to fix this?