jar

Run a .jar file using .sh file in unix

纵然是瞬间 提交于 2020-07-18 05:55:42
问题 I have a jar file DirectoryScanner.jar created in windows 7. I want to execute this jar on a unix server. I ran the following command in putty and the jar run absolutely fine as expected: java -jar DirectoryScanner.jar Now I want to create a .sh file on the unix server which on executing can run this jar. I created a file Report.sh in which I wrote following code to execute this jar: java -cp /home/applvis/Java/UAT/lib/DirectoryScanner.jar com.acc.directory.scanner.SDScanner But when I

what are the minimal JSF jars needed to deploy a JSF app with Tomcat

给你一囗甜甜゛ 提交于 2020-06-27 17:08:26
问题 I know that a minimal API is 4 jars, I remember facelets*.jar. What are the minimal JSF jars needed to deploy a JSF app with Tomcat? 回答1: Just use the JAR files which are provided/required by the JSF implementation you choose to use. Just download the implementation and read their own installation/users guide if you don't actually need more JAR files (as dependencies). As of now there are only two major JSF implementations: Mojarra and MyFaces. The number of JAR files may vary per

Spring boot with external jar 'Not a Managed Type'

风格不统一 提交于 2020-06-27 11:19:26
问题 I have a spring application that is pulling in a commons jar. This jar has DTO classes with annotations. Running the mvn clean build command runs successfully and builds the jar. Once i run java -jar target/MyApp-1.0.0.BUILD-SNAPSHOT.jar i will get the below error. I have opend the MyApp-1.0.0.BUILD-SNAPSHOT.jar and found all my classes inside that jar. I have opened the jar that contains MyApplicationJobDTO inside my snapshot and verified the file is there. It seems that at runtime java

Spring boot with external jar 'Not a Managed Type'

时光毁灭记忆、已成空白 提交于 2020-06-27 11:19:07
问题 I have a spring application that is pulling in a commons jar. This jar has DTO classes with annotations. Running the mvn clean build command runs successfully and builds the jar. Once i run java -jar target/MyApp-1.0.0.BUILD-SNAPSHOT.jar i will get the below error. I have opend the MyApp-1.0.0.BUILD-SNAPSHOT.jar and found all my classes inside that jar. I have opened the jar that contains MyApplicationJobDTO inside my snapshot and verified the file is there. It seems that at runtime java

Trying to read Scroll Lock status using JAVA

浪尽此生 提交于 2020-06-26 08:42:28
问题 I have the below lines of code using which i am trying to read status of scroll lock. I get the status of scroll lock when my program starts. However i am willing to get the status realtime. Please guide on the below package assignment; import java.awt.Toolkit; import java.awt.event.KeyEvent; import org.omg.PortableServer.THREAD_POLICY_ID; public class ScrollLockOnOff { public static void main(String[] args) throws InterruptedException { while(true) { Thread.sleep(1000); Toolkit toolkit

installing MongoDB java driver

你。 提交于 2020-06-25 19:07:29
问题 I'm really new in Java and also MongoDB world. I would like to use MongoDB and Java. I have downloaded MongoDB driver for java. It is a jar file, my question is how can I use this Jar file. I've used this command but I got an error: java -jar mongo-java-driver-2.9.3-javadoc.jar and the error: no main manifest attribute, in mongo-java-driver-2.9.3-javadoc.jar could you please help me to solve the problem? 回答1: First, that is not the correct jar. The jar you are referencing above contains the

installing MongoDB java driver

倖福魔咒の 提交于 2020-06-25 19:07:15
问题 I'm really new in Java and also MongoDB world. I would like to use MongoDB and Java. I have downloaded MongoDB driver for java. It is a jar file, my question is how can I use this Jar file. I've used this command but I got an error: java -jar mongo-java-driver-2.9.3-javadoc.jar and the error: no main manifest attribute, in mongo-java-driver-2.9.3-javadoc.jar could you please help me to solve the problem? 回答1: First, that is not the correct jar. The jar you are referencing above contains the

installing MongoDB java driver

丶灬走出姿态 提交于 2020-06-25 19:06:14
问题 I'm really new in Java and also MongoDB world. I would like to use MongoDB and Java. I have downloaded MongoDB driver for java. It is a jar file, my question is how can I use this Jar file. I've used this command but I got an error: java -jar mongo-java-driver-2.9.3-javadoc.jar and the error: no main manifest attribute, in mongo-java-driver-2.9.3-javadoc.jar could you please help me to solve the problem? 回答1: First, that is not the correct jar. The jar you are referencing above contains the

How to exclude certain dependencies from being added to the Class-Path in maven?

前提是你 提交于 2020-06-17 09:43:24
问题 I'm using maven to build an executable JAR and I want to add all dependencies minus a select few to the Class-Path of my MANIFEST.MF . So far I'm using the maven-jar-plugin for this: <!-- Add dependent JARs to the classpath --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>libraries</classpathPrefix> <mainClass>MyMainClass</mainClass> </manifest>

Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar

空扰寡人 提交于 2020-06-17 09:37:05
问题 I have used geotools library, in my project I have added all the dependencies to the buildpath Downloaded the libraries from Sourseforge. Added the same to the library, When I try to execute the application, I am getting the below error. SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details. Exception in thread "main" java.lang