jar

How to automatically collect all related class into one jar (use maven)?

旧巷老猫 提交于 2020-01-16 02:05:23
问题 I have a class ClassA in package packageA and ClassA import ClassB in packageB.(in fact ClassA import a lot of java file) Then the directory is : root pom.xml src packageA classA pom.xml packageB classB My goal is to generate a jar include classA and classB by only telling maven that I input classA. the pom.xml in the root directory is like <groupId>org.abc</groupId> <artifactId>all-code</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>\src\packageA<

How to export working jar with non-jar dependencies

流过昼夜 提交于 2020-01-16 02:04:03
问题 im fairly new to java and im making a pokemon style game for practice and i would like to be able to send the game to my friends. here is the main problem: the game works fine in my netbeans IDE, but using the jar file in my dist folder does not work and throws a nullPointerException. i have narrowed down the problem. my game uses imageIcons and png/gif images that i have imported in my libraries. im getting access to them like this Icon bckground = new javax.swing.ImageIcon(getClass()

How to export working jar with non-jar dependencies

此生再无相见时 提交于 2020-01-16 02:03:04
问题 im fairly new to java and im making a pokemon style game for practice and i would like to be able to send the game to my friends. here is the main problem: the game works fine in my netbeans IDE, but using the jar file in my dist folder does not work and throws a nullPointerException. i have narrowed down the problem. my game uses imageIcons and png/gif images that i have imported in my libraries. im getting access to them like this Icon bckground = new javax.swing.ImageIcon(getClass()

How to include source file(.java file) parallel to .class file in the generated jar using maven

烈酒焚心 提交于 2020-01-16 00:44:27
问题 I wanted to create my jars with wars with that should include source file(.java file) parallel to .class file in the generated jar using maven. (I know there are some plugins available to generate a separate xyy-sources.jar file. But I dont want to create a seperate source jar. I need a single jar file with both .class and .java file exists parallel) 回答1: You only have to add resources under build tag. For example. <build> <resources> <resource> <directory>src/main/java</directory> </resource

Failed to deploy to Heroku using Maven: Forbidden

落花浮王杯 提交于 2020-01-15 20:54:09
问题 I'm trying to deploy a jar with dependencies to Heroku, using the Heroku Maven plugin. I'm getting this error message: [ERROR] Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.4.4:deploy (default-cli) on project my-app: Failed to deploy application: Forbidden -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.4.4:deploy (default-cli) on project my-app: Failed to deploy application at org.apache.maven

call jar file from ruby class

杀马特。学长 韩版系。学妹 提交于 2020-01-15 16:43:35
问题 How to call jar file (a java archive file) from ruby class. And access the functions/methods from it. I am refering the following link But I am getting the following error: 'require': cannot load such file -- /tmp/Test.jar (LoadError) How can I resolve this issue. 回答1: You can use a system call. You may have performance issues if you have lots of users, but for most this should work: # Create a directory (in this sample called "jars") inside public directory and move your jar file inside the

call jar file from ruby class

爷,独闯天下 提交于 2020-01-15 16:40:36
问题 How to call jar file (a java archive file) from ruby class. And access the functions/methods from it. I am refering the following link But I am getting the following error: 'require': cannot load such file -- /tmp/Test.jar (LoadError) How can I resolve this issue. 回答1: You can use a system call. You may have performance issues if you have lots of users, but for most this should work: # Create a directory (in this sample called "jars") inside public directory and move your jar file inside the

Xamarin JAR binding not creating a binding for derived class from android.app.IntentService

半腔热情 提交于 2020-01-15 12:49:09
问题 I am trying to create an Android Java binding library. I have a class that that extends IntentService and I need it to be exposed in C#. When I build the project I got the following warning: Warning BG8102: Class eu.mypackage.UI.MyIntentService has unknown base type android.app.IntentService (BG8102) Is there a way to solve this? 回答1: At the end I found temporary solution. I have added IntentService class to my jar and make my extended IntentService extends IntentService from the package. It

Can javaCV be used with GAE(Google App Engine)?

≡放荡痞女 提交于 2020-01-15 11:21:56
问题 Can i use javaCV with GAE?? Now, i try to import javaCV jar to GAE,GWT project in Eclipse But it wasn't work... First, I makes GAE project in Eclipse that was installed GAE plug-in and add javaCV jar file to /war/WEB-INF/lib and config jar Build path so it wasn't confirm error in source But when i run WebApplication(local) some errors occur.. like this [ERROR] [jebal] - Line 72: No source code is available for type com.googlecode.javacv.cpp.opencv_core.IplImage; did you forget to inherit a

how to run a class from java jar file on Hadoop?

拟墨画扇 提交于 2020-01-15 10:06:45
问题 I have a jar file exported from Eclipse (Runnable JAR>>Copy required libraries into a sub folder). In java if you set the main class in the manifest.xml you can run: java -jar MyTest.jar arguments if you want to run another main class in the jar file or if you didn't set a main class in the manifest.xml you can run: java -cp MyTest.jar MyOtherMainClass arguments In Hadoop if main class is set in manifest.xml you can run: hadoop jar MyTest.jar arguments If you type: hadoop jar MyTest.jar