jar

Is there anything like ctrl + shift + T of eclipse in Android studio to see Open Type Window

一个人想着一个人 提交于 2020-01-17 04:29:07
问题 I just want to check some imported class belongs to which jar , that is it. There is alternative by checking each jar for the same package included in my code but i have lot of jar file included in my project , so i am specifically looking for the shortcut like eclipse Thanks In advance. Yash. 回答1: Ctrl + n to open up the class view and there you can see from which jars the classes come from. When you press it once it shows just for local modules/projects. When you press it twice it includes

How to deal with the repeated jar in Android Studio?

☆樱花仙子☆ 提交于 2020-01-17 02:42:27
问题 As shown in the figure,"xxx finished with non-zero exit value 2",some people say that is the repeated jars caused it.But I did not find the repeat jars yet.So,how can I deal with it? http://i3.tietuku.com/10ec1b3775cbb850.png App - build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.myatejx.quicknote" minSdkVersion 16 targetSdkVersion 21 versionCode 4 versionName "1.2.0" } buildTypes { release {

Executing batch file from runnable jar gives path not found error

☆樱花仙子☆ 提交于 2020-01-16 20:47:21
问题 I am executing a batch file from java program. When I execute from eclipse it works fine but when I make it a runnable jar it is not able to find the path of the batch file I kept the batch file as a resource in the source directory. When I print the path of the resource using Class.getResource("/resource/mybat.bat") it gives the path correctly as resources/mybat.bat (jar creation option : package required library into generated jar) file:/C:/Users/aasha.medhi/Desktop/myjar.jar!/resources

JRuby loadpath messed up

人走茶凉 提交于 2020-01-16 19:01:26
问题 I am embedding JRuby on a JAR file and it's being used by a EAR file that I am deploying to WebSphere. When I call the class from my workspace, it works fine, however when I call it inside WebSphere, here's what I get: [3/31/11 11:21:15:984 BRT] 00000042 SystemErr R classpath:/lib/xmlcompare.rb:4:in `require': no such file to load -- rubygems (LoadError) from classpath:/lib/xmlcompare.rb:4 from classpath:/lib/xmlcompare.rb:1:in `require' from <script>:1 After some research, I noticed that

Loading images in a jar

ぐ巨炮叔叔 提交于 2020-01-16 18:19:31
问题 I am using eclipse and I use the following code to load my image from a folder. getClass().getResource("/images/image.jpg").getFile()) The image folder is located inside the bin folder in the project folder. It works fine when loading in eclipse, but when I export it to a jar it does not load. I have tried puting the image folder in all possible places in the jar, but it does not. How do I load an image folder in a jar? 回答1: You can use getResourceAsStream() method instead to get InputStream

How do I put a icon on java applications?

独自空忆成欢 提交于 2020-01-16 12:02:15
问题 I have a question. I have a really cool game that I have made in eclipse. In order for people to execute it I want to convert it to a executable jar. Although I want the jar to have a icon like most .exe programs, although I don't know how to do that. What is the way that most people put icons on their java programs? I have converted it to a .exe with a icon before but I want to know if there is another way 回答1: The jar is not really an executable from the OS point of view - it is just an

How to read/write file in jar [duplicate]

房东的猫 提交于 2020-01-16 07:18:30
问题 This question already has answers here : How to read a file from jar in Java? (5 answers) Closed 6 years ago . Situation: I have a jar, and inside this jar is an file. In this file is an object written that represents the last state of the application (so that the user can pick up where he stopped). I'm using the java Serializable interface in orde to write and read the Object. My question is: how do I read the file when running the application from the jar. code so far: in = new

How to move “WEB-INF/lib” folder to a sub folder in a Java Dynamic Web App?

这一生的挚爱 提交于 2020-01-16 05:27:05
问题 How can I configure a Java Dynamic Web Project in Eclipse so the WEB-INF/lib folder is located in a sub folder? For example, say I wanted my "lib" folder to be located here: src/main/webapp/WEB-INF/lib and my webapp root is here: src/main/webapp/ How do I configure this in Eclipse? I know I could just "add the jars", but I'd like them to be organized under my "Web App Libraries" section in the Libraries section of my app's build path. What I've tried: I've tried adding "Web App Libraries" by

Can't run a jar file from the double click [closed]

空扰寡人 提交于 2020-01-16 04:23:21
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . If I double-click on my jar file, I get "Could not find the main class: HelloWorld. Program will exit." When I run it from the command line as "java -jar

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

a 夏天 提交于 2020-01-16 02:06:45
问题 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<