Questions tagged [executable-jar]
A special type of jar file which contains all non-standard libraries and definitions necessary to run an application on a JVM.
2,420
questions
0
votes
0
answers
17
views
JAR file compiled on IntelliJ not working in Android Studio
My Java application imports the Xerial SQLite JDBC library v3.43.0.0 to perform some CRUD functions, and it works as expected. However, I want to export this class as a JAR file and use it in my ...
0
votes
0
answers
7
views
MaryConfigurationException: MaryTTS and Maven shade plugin build executable jar
I am working on a JavaFX application in Eclipse that uses MaryTTS. In Eclipse the application works fine, but if I generate a runnable jar with Mavens shade plugin I get
marytts.exceptions....
0
votes
0
answers
13
views
How to run test cases as a jar in gradle, if the test folder doesn't has a main class
In my gradle application I have test folder containing all the test cases, but it doesn't has a main class. In intelliJ it runs by just right clicking on folder and selecting Run
My use case is to ...
0
votes
0
answers
31
views
Problem with running Project outside of IDE
My question is the following: When i start my programm inside my IDE (IntelliJ) via the run main class button, my project just works fine. I later found out that when i shadow Jar my project and try ...
0
votes
0
answers
28
views
include owl api jar files into an executable jar file
I am developing a java application that uses the owl api (v 5.1.19). Everything works fine when I run the app from eclipse.
I need to extract the app as an executable jar file. But when I do so and ...
2
votes
1
answer
61
views
ModuleLayer can't find my resources when running my modular program, but it can for my modular jar
I have the following project structure.
ProjectName
|
|---src
|
|---main
|
|---java
| |
| |---ModuleName
| |
| |---module-info....
-1
votes
1
answer
51
views
I can't load resources within a JAR even though I used getResourceAsStream
I want to load images from a JAR in a JavaFX app, but they don't show up even though it works in my IDE as expected. This is the output I get from load function file:/C:/Users/anass/OneDrive/Desktop/...
0
votes
1
answer
44
views
Spring Boot 3, groovy, docker
I have a Spring Boot 3 Application with following build.gradle
plugins {
id 'groovy'
id 'org.springframework.boot' version '3.1.3'
id 'io.spring.dependency-management' version '1.1.3'
}
...
0
votes
1
answer
28
views
How to run a jar located in local drive from a jenkins job?
I have created a job which creates a jar using maven & that jar gets stored in a local drive. I want to create a new job which runs that jar.
pom.xml for reference:
<project xmlns="http://...
0
votes
0
answers
69
views
ClassNotFoundException with the execution of a JAR using JDBC
I am using JDK 16 and I want to ask a question about building the JAR of a JavaFX application. I happen to have an application that depends on mssql-jdbc, my application runs inside the IDE (Intellij)....
0
votes
0
answers
16
views
Error: Could not find or load main class when build Jar file
I create a Kotlin project contains some dependencies in Intelij IDEA. I want to build fat Jar file, so I can run the jar directly using the following command:
java -jar jira-api-1.0-SNAPSHOT.jar
...
0
votes
0
answers
29
views
Why is my Spring Boot Application exiting after starting when ran with 'java -jar'
I have a simple spring boot application with the following in my build.gradle...
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org....
-1
votes
1
answer
47
views
How to package a .jar file using a java program
How does one package a jar file using java code? I want a .jar file to be created with custom code whenever (for example) a button is pressed, how would I do this? There doesn't seem to be any ...
0
votes
1
answer
124
views
Unable to execute fat jar of spring boot application
I have created a fresh spring boot project using IntelliJ idea. I have included jpa and mysql-connector dependencies.
build.gradle.kts file
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
...
-1
votes
1
answer
38
views
.jar file won't load resources in properly
I made a simple little java game that uses many .png files. I exported my game as a .jar file using VSCode. I try to load up my .jar file and the menu screen works fine but when I click play I get an ...
0
votes
0
answers
29
views
Finding file path after creating a JAR file with Maven
I have created a JAR file using Maven plugins and it runs. I read and write data using a .JSON file during my program. It is specified in the source code like this:
private static File getJsonFile() {
...
0
votes
0
answers
16
views
Finding a file path after creating a JAR file using Maven [duplicate]
I have created a JAR file using Maven plugins and it runs. I read and write data using a .JSON file during my program. It is specified in the source code like this:
private static File getJsonFile() {
...
1
vote
1
answer
59
views
When I run my JAR File I keep running into : "no main manifest attribute", How do I fix this?
I am currently trying to host my spring project on AWS and am trying to run my JAR file once in the EC2 instance, but I run into this error:
[ec2-user@ip-10-0-6-194 ~]$ java -jar ...
0
votes
1
answer
55
views
Executable Jar Structure Different from Intellij Project Structure (resulting in runtime error when executing from jar)
I have an java application that I can successfully execute from intellij (where I created it). I set it up in intellij to have the standard maven structure. Below is the structure from within intellij:...
0
votes
0
answers
76
views
How to deploy .jar files in Plesk Obsidian 18.52.0?
Up to and including version 17.5 Plesk Onyx came with a Tomcat installation, which is no longer supported from the current version Thus no .war files can be deployed and executed anymore.
A downgrade ...
1
vote
0
answers
33
views
How to run JUnit on the command line?
I'm running a small lab on a directory (Lab7) with the following subdirectories:
bin
lib
src
test
I need to compile my test file using the jar file in /lib and have its class redirect to the /bin ...
0
votes
0
answers
16
views
Java - jar - consuming compiled class which extends another class - 'this' reference is null [duplicate]
Consuming a compiled class (which extends another class) from a jar, the methods from parent class methods are added with 'this.' which is throwing null pointer while consuming those methods ('this' ...
0
votes
0
answers
11
views
how do i run a java associated program via batch file commands?
I have a .jar program that runs with jre-installed, when i run it, it abruptly exits. I want a command written in notepad or something on Windows platform that can execute this .jar file.
Something ...
0
votes
1
answer
155
views
Writing to an excel sheet in a JAR file
I made a Java project in netbeans that uses data from an excel sheet. There is functionality in my project that allows the user to read and write to the excel sheet. I have used the Apache POI library ...
0
votes
0
answers
49
views
Getting java.lang.NoClassDefFoundError error while running a JAR [duplicate]
I have 3 jars a,b,c A is dependent on B and B has one jar let's call it jar c inside it i.e nested Jar.
Getting error when B is trying to access class of Jar C.
I have added the jar C in the class ...
0
votes
1
answer
187
views
Graalvm generated binary is working inside the project directory but not outside that directory
I am using a rather simple Java application that receives an input file, process it and generate an output file. I am using Picocli for arguments to the application and Graalvm to create a native ...
0
votes
2
answers
56
views
How to add Slf4j to the compiled jar after creating it
I have an issue here and I cannot wrap my head around it.
I need to add Slf4j dependency to my compiled jar after doing "mvn clean install".
This is because, if i try to run my jar app, I ...
0
votes
1
answer
45
views
Anylogic build does not produce JAR files
I need JAR files of an empty simulation environment. I tried to build my project, and expected to have a compiled version of my project. But I cannot find it anywhere in the project path. I do not use ...
0
votes
0
answers
231
views
Generate and run JAR from Spring Boot project with Gradle doesn't work
I have an API project made in Spring Boot with Gradle and it works when I run the application from the IDE, but if I try to compile, build and run the project in a JAR, it doesn't work and I get the ...
0
votes
0
answers
19
views
Exception in thread "main" java.io.FileNotFoundException: ConfigReader.htmlSourceURL (The system cannot find the file specified)
I have a code that fetches data from a HTML file and inserts that data in a MSSQL table
I have added log4j properties file and log4j jar
also added a config file which has html source and MSSQL ...
0
votes
0
answers
63
views
Not able to run springboot jar using commandline shows Error: Could not find or load main class –jar
I wrote a simple springboot app as below and ran mvn install to get the jar file
@SpringBootApplication
public class Processor {
public static void main(String[] args) {
for(int i=0; i&...
0
votes
1
answer
59
views
Reading resources from eclipse and a runable jar
I'm trying to read files in a directory from the runnable jar, but the follwing code works only in eclipse, however, it doesnt work in the running jar using java command
import java.io.File;
import ...
0
votes
0
answers
74
views
How to get Gradle jar task to output same archive that is generated by bootJar
I have a Gradle based SpringBoot 2.7.9 application and when I execute ./gradlew jar it produces:
/Users/user/git/repo/build/libs/repo-0.1.0-SNAPSHOT-plain.jar
Which is not executable.
I really want ...
0
votes
0
answers
90
views
How to create java jar files while including external jars too?
I'm creating a java app that uses external jars mainly JFreeCharts and JCommon now when I'm compiling my project with
javac -d build\classes -cp ".;build\\resources\\jfreechart-1.0.1.jar;build\\...
0
votes
0
answers
214
views
How to generate executable jar for SpringBoot application with Spring Boot Loader
How we can generate executable jar for SpringBoot application in below structure
example.jar
|
+-META-INF
| +-maven
| +-MANIFEST.MF
+-org
| +-springframework
| +-boot
| +-loader
...
1
vote
1
answer
47
views
JAR File in Installation folder
We have used install 4j for converting jar to exe/dmg installation. But the installation directory is including even jar file and exe file. How can we hide the jar file in the installation directory ...
0
votes
0
answers
78
views
How to run Your Java App with argument as a Service on Ubuntu
To run the java code as background in the ubuntu server I followed the following steps:
Create a .jar file and place it in one folder (/home/ubuntu/vijay)
Create service (start.service and place in /...
0
votes
0
answers
260
views
Cannot execute my jar - Error: Could not find or load main class
I'm having an issue that's been holding up my project for a few days now.
I'm new to Java and its ecosystem but all I'm trying to do is create an executable jar file, yet I keep getting an error ...
0
votes
1
answer
64
views
when run web view from the ide its fast but when run jar its so slow i use maven
my problem is when I try to display pdf in my JavaFX app, the pages load fast when I run from the ide
but its to slow and show not respond, I set the heap to 3000mp without any difference
I use the **...
0
votes
0
answers
135
views
GStreamer - using dispose function won't clean up resources
I am running the code once with a loop which use pipelines and buses again and again.
at the end of each iteration i want to clean completely all the resources.
I've looked into the documents and ...
0
votes
0
answers
91
views
Java LinkageError when trying to run .jar file, asks to run with --enable preview
My system is a Windows 10
I'm using java jdk 19 with no build tools
I'm trying to run a .jar file generated from my code using vscode "export jar" option, but double clicking the resulting ...
0
votes
1
answer
228
views
Running AWS Batch Job on the JAR artifact from S3 bucket
In one of specific requirement, we need to use a Jar executable provided by other team in one of S3 bucket in a aws batch. The plan is to configure a aws batch which will spawn a EC2 instance, will ...
0
votes
0
answers
330
views
Could not get job jar and dependencies from JAR file: JAR file does not exist:
When I am submitting a file from hdfs to flink as a job , it is showing it "Could not get job jar and dependencies from JAR file: JAR file does not exist" but the file is preset in the given ...
0
votes
0
answers
90
views
Running bash command to execute Jar file in Google Colab
I have the following to execute a jar file with the input as english.test file.
bashCommand = f"!java -jar {main_dir}negsel2.jar -self {main_dir}english.train -n 10 -r 4 -c -l < {main_dir}...
0
votes
0
answers
67
views
How to convert my Testng-Maven Selenium project to Executable jar file?
I want to convert Selenium project to executable jar file.
As Testng wouldn't have main class and as jar file looks for main class for execution,
how do we solve this?
I have created a Runner class ...
0
votes
0
answers
81
views
Is there a way of calling a function in scala/python from one Azure Databricks environment to a different Azure Databricks environment?
I have 3 resource groups named 80231, 80232, and 80233. I have null and duplicate check functions used by all the notebooks in these three environments. Is there any way to store a "class" ...
0
votes
0
answers
237
views
Gradle Build Jar with Local Dependencies
I am building a jar file using gradle. I have local jar files as dependencies. Those jars have additional local dependencies stored in the same directory. I used the following build.gradle file
...
-1
votes
2
answers
135
views
Customize Spring Boot executable-jar startup script
I'm trying to run Spring Boot executable-jar built using spring-boot-maven-plugin on a Linux machine. The machine has multiple jdks installed, the one on PATH is jdk8 and changing it is unfortunately ...
1
vote
0
answers
125
views
Tika PDF to html truncates content of <li> tags which exceeds 254 characters
I am trying to convert a PDF document to HTML. It works fine but when it converts any list which contains more than 254 characters, it truncates the content and appends ....
Following is the code that ...
0
votes
2
answers
126
views
How to embed a jmeter jmx file in an executable file
I have created a test script jmx from Jmeter and I'm able to execute it in GUI mode and in non-GUI mode,
but it needs always jmeter application as prerequisite in order to invoke the jmx script as ...