jar

Compiling a maven project with class from external jar file (that is not in a maven artifact)

两盒软妹~` 提交于 2020-01-02 03:41:16
问题 I'm somewhat new to java, and very new to maven. I might use some terminology imperfectly. As I develop my project that I'm using use maven to build, as I've needed classes that aren't part of the core java language I've added an appropriate <dependency> section to my pom.xml (usually copied from mvnbrowser.com without my really understanding it very well), and I've been able to use the classes I want. Works great. Now I've encountered a java class that I want to use that is apparently not

Add Java Libraries to a Netbeans Grails Project

主宰稳场 提交于 2020-01-02 02:53:05
问题 I am just getting started with Grails. How do I add Java libraries to my Grails project? I added the Smack library jar to the lib folder of my Grails project, but I still cannot import any of its packages into my Java or Groovy classes. I am using the Netbeans IDE. Any help would be appreciated.. Buzzy 回答1: This is a know bug in NetBeans: http://www.netbeans.org/issues/show_bug.cgi?id=144243 Maybe you can help the devolpers to fix it by adding a comment to this issue in the NetBeans bug

How to execute jar with command line arguments [duplicate]

旧街凉风 提交于 2020-01-02 02:51:23
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Passing arguments to JAR which is required by Java Interpreter how to provide command line input to a file which is in a jar I have a jar file hello.jar with some say execute.java file which i want to execute from command line with two arguments;how can i achive this i have mentioned a executable.java as a main class in a manifest file and using ant i have to run this file from ant run with command line

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest [duplicate]

有些话、适合烂在心里 提交于 2020-01-02 01:53:07
问题 This question already has answers here : java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest (4 answers) Closed 3 years ago . I get the following error: 06/08/2011 02:56:33 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet UploadTheme threw exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.apache.commons.fileupload.servlet.ServletRequestContext.getContentType(ServletRequestContext.java:73) at org

Necessary jar files for basic sturts 2 application

丶灬走出姿态 提交于 2020-01-01 22:15:21
问题 I am just new to Sturts 2 Web Application Development. I started with basic hello world Sturt application. Its working fine, but m still wondering that what jar files are needed for what kind of Sturts 2 application, or at least for a basic sturt application. 回答1: Now that have a working Java web application, lets add the minimal required Struts 2 framework Jar files to our web application's class path. And copy these Jar files from the lib folder of the Struts 2 download to the WEB-INF/lib

Can't load resources file from jar

倾然丶 夕夏残阳落幕 提交于 2020-01-01 19:18:31
问题 I'm using configuration JSON file stored in src/test/resources/config.json . I'm getting it like this: String configFile = this.getClass().getResources("config.json").getPath(); I have getPath() method, because I need its String value, then check if file exists and finally parse it. In Eclipse IDE everything works fine, because I parse file /bin/config/config.json , but when I create JAR file, the path is program.jar!/config/config.json and function !Files.exists() returns false. How can i

Exclude Jar from Ant Build using zipgroupfileset

落花浮王杯 提交于 2020-01-01 18:44:04
问题 I have created a Jar Project which contains Filter . I need to use servlet-api.jar when I compile the Filter code. But when I want to use the Jar in another application, I want to build the jar in such a way that it will exclude servlet-api.jar . I am using Apache Ant with NetBeans 8: I have added below code in build.xml . <target name="-post-jar"> <jar destfile="dist/MyJar.jar"> <zipfileset src="dist/MyJarAsLibrary.jar"/> <zipgroupfileset dir="dist/lib/." excludes="javax/*"/> </jar> </target

Error: Multiple dex files define Landroid/support/annotations/AnimRes with Admob and Facebook Cordova plugins

本小妞迷上赌 提交于 2020-01-01 14:21:16
问题 I'm building an app using cordova and the Ionic framework. I'm using the Wizcorp facebook plugin: https://github.com/Wizcorp/phonegap-facebook-plugin . and I recently added the google admob plugin: https://github.com/floatinghotpot/cordova-admob-pro However now when I build my project I'm met with the error: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/annotations/AnimRes; Other SO solutions mention multiple android-support-v4.jar

H2 embeded DB with spring boot error auto configuring

无人久伴 提交于 2020-01-01 10:59:34
问题 i'm trying to use the H2 embedded DB with spring boot. But, it throws the following errors. 2016-10-19 22:05:25.818 INFO 14104 --- [ main] com.example.SpringDemoApplication : Starting SpringDemoApplication on BOM1-LPMP12AS7U with PID 14104 (D:\workspace\eclipse\SpringDemo\target\classes started by e3028311 in D:\workspace\eclipse\SpringDemo) 2016-10-19 22:05:25.822 INFO 14104 --- [ main] com.example.SpringDemoApplication : No active profile set, falling back to default profiles: default 2016

Can I execute Two different Classes from same jar file?

半腔热情 提交于 2020-01-01 09:42:06
问题 I have a project where in one package I have made Server and in Second Package I made Client. It is working fine. I want to create a Jar file. Is it possible to run Client and Server Separately from same jar file? I have used jar file where there is only one main and when I run jar file, it automatically runs that class. Now here I will be having 2 executable classes. I want to pack them in only one jar and then want to run both from that same jar file. Is it possible? Any Suggestions, links