2022 Developer Survey is open! Take survey.

Questions tagged [jar]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
98 views

Delete a file from a jar file without using zip command or extracting the jar

Is there a way to delete the file from a jar file without extracting it or without using the 'zip' command? Thanks
user avatar
0 votes
0 answers
66 views

Argument/Parameter to start java game (.jar file) as maximized window

Im playing game called Spiral Knights I launch .jar file with this batch command and portable java CD "App" "E:\Programy\Portable Apps Platform\PortableApps\CommonFiles\Java64\bin\java....
user avatar
1 vote
0 answers
283 views

Jenkins: Unable to access jarfile remoting.jar

I am have a Jenkins setup, where Controller (linux) is connected to slave (windows) via ssh using username/password authentication. I am whenever I try to launch the agent I get Error: Unable to ...
user avatar
  • 11
2 votes
2 answers
2k views

How can I find all *nested* jar files containing the log4j library

I have read here that the log4j library can be "nested" within other files that are deployed with an application. I can find files with 'log4j' in the filename but don't know how to find ...
user avatar
2 votes
1 answer
279 views

How do I use Bash to tell Java to run a .jar program in a specific Linux directory?

I am trying to write a Bash script to (amongst other things) run a particular Java programme stored in a .jar file. The script is in a directory we will call foo. It includes this line java -jar ~/...
user avatar
  • 206
1 vote
1 answer
33 views

A java app only works when I do not include its".jar" extension in the command line, why is that so?

I have been given a jar file to run it like this: java -jar app-versions-name.jar -settings ...(and some more arguments) However, it does not work, stating the file cannot be found. But when I ...
user avatar
1 vote
1 answer
167 views

I've been trying to open a jar file but every time I do so It tells this jar file could not be launched

java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) Joses-iMac-5:~ luissoto$ java -jar/...
user avatar
  • 11
2 votes
0 answers
3k views

Install git Plugin for DBeaver

Problem I have DBeaver 6.3.3 installed on one of our remote servers. This remote server has no connection to the internet. Thus, I need to install drivers / plugins from a local file (I have the ...
user avatar
  • 121
0 votes
1 answer
90 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 ...
user avatar
  • 15.9k
0 votes
1 answer
39 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?
user avatar
0 votes
0 answers
35 views

.jar File won't work for some reason

I wrote and compiled a java program and the resulting files are (HelloWorldSwing.java), (HelloWorldSwing.class) & (HelloWorldSwing$1.class) as shown in the image The files are in a package called ...
user avatar
1 vote
2 answers
18k 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 ...
user avatar
  • 13
-2 votes
1 answer
43 views

Services prefer to block executable files, why is that?

I have been having a discussion with a friend of mine about executable files, more specifically .jar and .exe files. When you download a file from your browser it usually asks for permission to store ...
user avatar
0 votes
0 answers
871 views

Launching an executable .jar on computer start so that when windows logs in the user does not see the Windows Desktop

I am new to this side of the forum, so hopefully this is not off topic. I wish to run an executable .jar file before the windows login screen is ever shown to the user so that when windows logs in to ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
0 votes
2 answers
144 views

jar file doesn't finish installing

I want to install: landserf230WindowsInstall.jar I have: Windows 7 & the most recent Java (jre-8u211-windows-x64) What I've tried: When I run cmd as admin and paste the path file of the jar ...
user avatar
1 vote
0 answers
342 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 ...
user avatar
  • 111
0 votes
0 answers
911 views

Windows 7 Jar not running with double click

I have the following problem: I wrote a program in Java for a community and they're trying to run it. They installed Java and tried double clicking it but nothing happened. Under my remote ...
user avatar
  • 101
2 votes
1 answer
2k 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, ...
user avatar
  • 479
1 vote
2 answers
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 ...
user avatar
  • 7,312
1 vote
1 answer
106 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/...
user avatar
  • 479
1 vote
2 answers
277 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 ...
user avatar
5 votes
5 answers
38k 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 ...
user avatar
  • 164
0 votes
1 answer
867 views

MAC OS - Terminal command to set JAR program to run at startup?

This is where MAC OS stores its start-up items, /Library/LaunchAgents How to set a JAR program from Terminal to run at startup? Also how to remove existing program from startup?
user avatar
0 votes
1 answer
550 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, ...
user avatar
  • 103
0 votes
1 answer
3k views

How do I run multiple jar files from shell or cmd, and have all of them use different proxies?

I'm trying to run a jar file through a socks proxy. If I only had one jar, it would probably work to just change system variables, but I need to run like 20 jar files at the same time, all with ...
user avatar
0 votes
1 answer
641 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 ...
user avatar
  • 87
0 votes
0 answers
1k views

Unpacking and then repacking a war file using batch command is increasing the size of the war file

I have a war file named CheckIn.war. I use the following batch command to unpack and then pack the war file. I also use a java code to change a value in an xml file after unpacking. jar -xvf CheckIn....
user avatar
  • 41
-1 votes
1 answer
467 views

Why is plain jar file compressed to 76% but after ProGuard shrink & obfuscate; it is compressed to 102% ?! How to fix?

I have a jar file of size 392 MB. I made another copy of it, so I have now two copies of the same jar file. For one of them I used 7-zip to compress it. It is compressed to 76% of the original size, ...
user avatar
1 vote
0 answers
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 ...
user avatar
  • 217
4 votes
1 answer
634 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!!!
user avatar
16 votes
6 answers
26k 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.
user avatar
0 votes
1 answer
2k 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 ...
user avatar
0 votes
1 answer
357 views

I can't run a jar file with

OK, so I can't run jar files of any sort on my windows 7 pc, the one in particular I'm trying to use is the forge installer for minecraft so an installer window should open when i double click the ...
user avatar
10 votes
3 answers
43k 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?
user avatar
  • 203
2 votes
1 answer
4k 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 ...
user avatar
1 vote
2 answers
3k 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 $(...
user avatar
  • 11
5 votes
2 answers
42k 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 ...
user avatar
0 votes
3 answers
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 ...
user avatar
0 votes
1 answer
7k 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 ...
user avatar
0 votes
1 answer
186 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.
user avatar
  • 1
8 votes
2 answers
13k 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 ...
user avatar
  • 193
58 votes
8 answers
86k 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 ...
user avatar
  • 848
0 votes
1 answer
4k views

Execute a jar with double click in linux

What I'm trying to achieve is to run a java program on any Linux system (Ubuntu, Fedora, etc... covering as much as possible) by simply double clicking a file-like I would on Windows. I have created a ...
user avatar
  • 369
1 vote
2 answers
3k 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 ...
user avatar
0 votes
1 answer
130 views

Problems to open jar file

I use mac with mountain lion and java u update 21. When I try to open the file with a double click, I get the following error: java file.jar could not be launched, or sometimes not after the double ...
user avatar
0 votes
1 answer
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 ...
user avatar
0 votes
1 answer
3k views

Cannot delete jar from lib/ext folder

I've added a jar in the extension folder of my JRE (lib/ext) in order to provide an extension code to my applications. Now I want to delete this jar, but I cannot. The error message says: Cannot ...
user avatar
3 votes
2 answers
753 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
user avatar
  • 369
1 vote
0 answers
75 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 ...
user avatar
  • 111