Questions tagged [jar]

1

votes
2

answer
52

Views

Cannot run jar on ubuntu with JFX

Good day, I am trying to run a program called graphdb-native-app-8.8.1-jfx.jar on a ubuntu virtual machine. I have the latest version of java installed, and have made sure JAVA_HOME is set to the correct java-version. java -version java version '11.0.2' 2019-01-15 LTS Java(TM) SE Runtime Environment...
Andrew Malcolm
1

votes
2

answer
28

Views

maven-jar-plugin does not include .gitignore file

I try to package an application into a jar file with maven. Somehow all files except .gitignore files are added to the jar. Why is this file skipped and how can I disable this? Even if I try to include it like below the include is ignored and the jar file remains empty. org.apache.maven.plugins mave...
ochs.tobi
0

votes
1

answer
20

Views

Passing runtime parameter to JAR in DockerFile not running

Dockerfile: FROM anapsix/alpine-java ADD abc-server-application.jar abc-server-application.jar EXPOSE 9199 ENTRYPOINT ['java','-Dkafka_delay_time=20','-DlogsInclude=docker-logback.xml','-jar','abc-server-application.jar'] In /home/user/abc - I have placed the JAR and the Dockerfile and docker-logbac...
Vijaya
0

votes
0

answer
7

Views

Compile Java JAR File with additional JAR packages

For an specific emailing functionality, I have a HelloWorld.java class, calling objects inside javax.mail.jar and javax.activation.jar, looking like this: //SENDEMAIL JAVA CLASS import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; i...
Brethlosze
1

votes
1

answer
47

Views

ProGuard modifies (increases size) skipped classes

I'm obfuscating an executable jar using ProGuard version 5.3.3. My jar contains other libraries which I do not want to obfuscate or optimize. This is my ProGuard config: -libraryjars 'C:\Program Files\Java\jre1.8.0_131\lib\rt.jar' -injars myjar-debug.jar -outjars myjar-release.jar -skipnonpubliclibr...
PC.
1

votes
1

answer
571

Views

Kotlin (Maven) - executable JAR without source files

I wanted to create an executable kotlin jar file with maven. But somehow the kotlin source files are packed with the jar. I configured the kotlin plugin and the maven assembly plugin to create a self-contained jar. Here are the dependencies and plugins of my pom: . 1.8 1.8 1.2.0 0.20 server.RunKt ju...
mrdlink
1

votes
0

answer
60

Views

Maven: Packaging a jar with separated external resources and dependencies (including external dependencies)

Here is what I'm trying to achieve - a dist directory that looks like this: dist/ |-- application-1.0.jar |-- resources/ |-- application.properties |-- testing.config.xml |-- training.config.xml |-- ... |-- lib/ |-- *.jar That is, I want to produce a folder 'dist', that will contain my application-1...
Hussein Dahir
1

votes
1

answer
557

Views

Can't find the classes of an external jar imported in Eclipse

I created a new project in Eclipse in which I want to use the JTS library. I imported the library during the creation of the project but I can't find the classes in the package explorer. Since I am not experienced in Java and Eclipse, I'll explain what I did from the start. I download the JTS librar...
J-J
1

votes
0

answer
295

Views

Gradle - ivy dependencies: only download the jar files

I am trying to figure out how to use ivy dependencies in gradle and have it download only the jar file from the repositories. As it stands right now I get the zip files for javadocs and various source archives which is causing unnecessary bloat in my war file. I am new to gradle and slowly trying...
Ed Dunn
1

votes
0

answer
119

Views

JNI Error caused by java.lang.ClassNotFoundException: org.thymeleaf.templateresolver.ITemplateResolver

my Spring Boot App that I built with maven starts in intelliJ and does as intended, but when I run the .jar it gives me this error: Error: A JNI error has occurred, please check your installation and try again Exception in thread 'main' java.lang.NoClassDefFoundError: org/thymeleaf/templateresolver/...
Sophia
1

votes
1

answer
443

Views

Solving NoClassDefFoundError exception with SWT

I am trying to create a program using the SWT library, but when I try to run it I get the following exception: Exception in thread 'main' java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Layout at il.ac.tau.cs.sw1.trivia.TriviaMain.main(TriviaMain.java:9) Caused by: java.lang.ClassNotFoundEx...
Gabi G
1

votes
1

answer
147

Views

Could not find or load main class App when creating the jar file for javafx application

I am creating the jar file for the application using intelliJ artifact building. In here I keep getting this error even though I have configured all the options as mentioned in the documentation. In output layout I have configured the Main class, MANIFEST.MF file. And I have tried running the file u...
jsb9009
1

votes
1

answer
232

Views

How to include libraries when creating .exe from .jar with exe4j

I wrote a Java FX Tool, which connects to an .accdb database and created an executable JAR file from it which works very well. In the same folder of the JAR file, I have several JAR libraries, which I need in order to connect to my database. Now I want to create an executable file (.exe) from the ex...
knorrbert
1

votes
1

answer
47

Views

Changes to scala not appearing in jar

I'm using ehiggs terasort. The project is comprised of Java and Scala. I want to edit some of the Scala. Initially I'm only adding a println to com.github.ehiggs.spark.terasort.TeraGen.scala. I made the change and saved the file. I then ran mvn install as per the README. When I use the jar that gets...
pac
1

votes
1

answer
61

Views

How to create autonomus jar with using other jars?

My java project is not big, actually it is a studing project, and I'm using some eclipse jars that cannot be imported by maven. So I just put them in resources folder and created dependencies. But when I make a package it all goes wrong. It either doesn't include those dependencies, or doesn't inclu...
Bobby
1

votes
0

answer
224

Views

which version of ojdbc jar for JDK6 and oracle dB 12.2 use?

I am tried to connect Oracle 12.2.0 with Ojdbc6.jar. I installed jdk 6.13 but not able to login to database. I getting this exception:ORA-01017: invalid username/password; logon denied. I am 100% sure my username and password is correct as I am able to login from Oracle TOAD using these same credent...
o.narkar
1

votes
0

answer
236

Views

Spring boot logback.xml for external JARs

I've used Spring boot to implement my REST SERVER. I have added some functions in an external JAR which is called by Spring Boot application. I can use the logback.xml to configure the logging for Spring boot application, but the external JAR is not using the same logback.xml. In fact, the external...
Helio Aymoto
1

votes
1

answer
253

Views

Java + Maven - executable jar from test class

I've got a multi-module Selenium project that's using the Page Factory and running tests through Suites by calling mvn clean verify... I've created a JavaFX app that loads all the Suites and lets the user select a test, which is then run by the above-mentioned command. The problem I'm facing now is...
StopTheRain
1

votes
1

answer
297

Views

FireMonkey Android - handle callback message (JHandle) of JAR object

I have a big problem for a long time - I am looking for a solution everywhere, but after really many hours of testing I can not find a sensible solution. I have a JAR library for the Zebra printer and a PAS file for it (http://aboutit.pl/MobilePrinter.zip). I need a piece of code in Delphi that will...
Insane
1

votes
0

answer
111

Views

How to fix the issue: In jar creation with mongo DB dependencies for stand alone progam

I have generated the executable fat jar file in java with the following dependencies 4.0.0 com.function.thumbnail Thumbnail jar 1.0-SNAPSHOT Thumbnail http://maven.apache.org org.mongodb mongo-java-driver 3.2.2 com.googlecode.json-simple json-simple 1.1 org.imgscalr imgscalr-lib 4.2 commons-lang com...
Sekhar
1

votes
0

answer
25

Views

Access classifier as property during maven build

I have a pom.xml with several classifier specified as follows: org.apache.maven.plugins maven-jar-plugin first jar-1 package jar jar1 jar2 package jar jar2 In a single package a different jar is compiled for every classifier. For every classifier I want to specify a different value for the same prop...
Ivaylo Mihaylov
1

votes
0

answer
47

Views

Can't load custom look&feel from JAR file since Java 9

My Java application uses the Substance look&feel for its UI. My application is released as .jar file, which includes the dependency .jar files for the look&feel in its root directory. The Manifest file looks like this: Rsrc-Class-Path: ./ jgoodies-forms-1.4.1.jar jgoodies-common-1.1.1.jar netty-3.6....
Matthias
1

votes
1

answer
26

Views

How to manage JAR dependencies from the consuming application

I have created two JAR files. The first contains the core logic to a scheduling service. The second is a Web Fragment Project that contains an optional JSF presentation layer for the former. Each contains its own dependencies in their respective LIB folders and references them in their build path. W...
vhdz04
1

votes
0

answer
59

Views

Java executable jar get file

I need an executable jar for my program. A part of the program contains the Gate entity extraction tool. Here is the part of the code: ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader.getResource('annie.gapp').getFile()); // CorpusController application = (Co...
sp0030
1

votes
1

answer
44

Views

JAR generating with Maven

I get this error during generation of JAR with Maven: Failed to execute goal on project TaskManagerTrue: Could not resolve dependencies for project groupId:TaskManagerTrue:jar:1.0: Could not find artifact groupId:TaskManagerTrue:jar:1.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1] M...
SummertimeSadness
1

votes
2

answer
509

Views

Batch script to send commands to gracefully shutdown multiple Spigot Minecraft servers

I'm wondering if it possible to make a windows batch script send commands to three already running .jar file instances. In this case the open .jar files correspond to a bungeeCord instance, a survival instance and a hub instance. Each of these .jar instances together, form the entire Spigot Minecr...
GR412
1

votes
1

answer
714

Views

“A JNI error has occurred, please check your installation and try again” Sat4J

I wrote a java programm using Sat4J and it works fine. Now I want to export it as a jar-File, but when I execute it, it allways says 'A JNI error has occurred, please check your installation and try again Exception in thread 'main' java.lang.NoClassDefFoundError: org/sat4j/specs/TimeoutException' I...
Kathi
1

votes
1

answer
175

Views

Maven assembly for .zip the project with only .jar and configuration files

I am trying to use the assembly maven plugin to .zip my project with my project .jars and some configuration files. I want the JAR from modules admin batch_base_to_base batch_engine batch_generic and some files into misc My issue is that my assembly does not take my configuration files and it does t...
Logan Wlv
1

votes
1

answer
278

Views

Using Conda to package a set of JARS

I am trying to package a set of JAR files into a single conda package. The reason is so I can push this package to an internal conda repository, and then use conda to manage deployment. My conda.recipe/meta.yaml looks like this package: name: my_java_apps version: 0.0.0 source: path: ../build/all...
victtim
1

votes
1

answer
45

Views

Read resources from specific JAR file (duplicate paths to file)

Let's say you have jar1 with artifactId zoo, and jar2 with artifactId animals. Both jars have a resource file with the same path (ex: /animals/animal.txt). Is there any way to read that file from a specific jar? Using getResourcesAsStream also returns the first jar but sometimes I want the second ja...
Will Smith
1

votes
0

answer
50

Views

Error while binding amazon ads sdk in xamarin

I'm trying to binding the amazon ads sdk in my project. I'm using the latest version (5.8.2). I follow all the steps describe here. After cleaning, and building, i had 5 errors: Error CS0234 The type or namespace name 'MobileAdsLoggerFactory' does not exist in the namespace 'Com.Amazon.Device.Ads' E...
French_FitGirl
1

votes
0

answer
431

Views

getting error 'Could not find or load main class' on executing jar file created using intellij

I'm developing a Java-based app using Java8, JavaFX, and some other third-party libraries in IntelliJ. My project directory looks like this Everything is working fine until the execution of JAR file. When I'm trying to run same using command java -jar myJarFile.jar it's giving this error 'Could not...
Shubham Madheysia
1

votes
0

answer
140

Views

Jar file extract issue

I have a jenkins job which create an artifact jar with dependencies with maven. When I download the jar file from jenkins work space and try to extract it locally using jar xvf jarfile-with-dependencies.jar I got following error: java.io.FileNotFoundException: META-INF\maven\org.slf4j (Access is de...
Infinite
1

votes
0

answer
305

Views

Says “package … does not exist” despite its JAR is inserted

I've built Fresco and copied the created *.jar packages into libs folder that is placed in the root directory of ReactAndroid project like the following: directory setup: - node_modules - ReactAndroid - libs - drawee-1.3.0-sources.jar - fbcore-1.3.0-sources.jar - src - main - java - libraries - buil...
efkan
1

votes
0

answer
112

Views

Maven - export a jar with a bundled file

I am trying to export a jar with a bundled file (readme.md) via the pom.xml I want the exported jar to look like this: I tried using maven jar plugin as depicted below. However, I get a java file but no readme.md inside it. Here is my plugin: org.apache.maven.plugins maven-jar-plugin 2.4 jar src **...
Hesham Yassin
1

votes
1

answer
343

Views

Run a jnlp file after migrating to Java 8

I am working on a project and the client is now moving from Java 6 to Java 8. We download a jnlp file in our project to run a java application. In Java 6, we had no issues but now after migrating to Java 8 we are facing security problems as we cannot use a self-signed jar anymore. The client has pro...
Rachit Agarwal
1

votes
0

answer
350

Views

Create fat runnable jar for spark-submit

I'm writing a Spark application using Java(not Scala). Something like: SparkConf conf = new SparkConf().setAppName('TEST'); JavaSparkContext sc = new JavaSparkContext(conf); sc.setLogLevel('WARN'); I started with simple java project and when to compile the project into a runnable jar for SPARK-SUBMI...
DXC
1

votes
0

answer
119

Views

How to include third party JARs in Android library AAR, without code

If build an aar that contains a third-party jar, the code will be included. It's included in classes.jar, but I do not want this. I use only part of the jar's api, which causes a crash when another app uses the same jar. error is Caused by: java.lang.NoSuchMethodError: No static method BC()[B in c...
i like cat
1

votes
0

answer
68

Views

How to embed executable jar file in webpage?

I'm pretty new to web development. Though I want to create a single page web application where I can allow users to run executable jar file created for doing some activity or else made it available for download. I have got some results on internet, but it was for running applet in web browser.
Pooja
1

votes
1

answer
47

Views

Using CMD to compile Jar files (for class use) with Java Files

I am trying to use the Gson Java library for ArrayLists to JSON object class use. My current Bat code for compiling it is this: @echo off javac -cp '.;/gson-2.8.2.jar' AdobeExtender.java java -cp '.;/gson-2.8.2.jar' AdobeExtender pause This is what I am using in my java code to call the class in the...
Random Dude

View additional questions