jar

Deploying only some of the dependencies with maven

北城余情 提交于 2019-12-24 13:11:46
问题 I have a problem that I do not know how solve it properly. I'm developing plugins for a program that loads these plugins dynamically on start up. Everything worked out very well so far as I usually only do use dependencies like Apache Commons which have been used by the main program, too. Now I tried to play around with Google Guice and the main program does not have the package in the class path and so there is a NoClassDefFoundError at start up of course. I used google for a while to find a

jar as jboss module: dependencies

a 夏天 提交于 2019-12-24 12:47:23
问题 I have a question about JBoss modules dependencies vs war dependencies. I have an app.war ; its webinf/lib directory contains a myLib.jar only . In this configuration everything works fine. Now I have to move mylib.jar outside the war, so I put it into a JBoss module and added it to module.xml; I also added it to the deployment-structure.xml file in the war. In this new configuration my app.war finds succesfully the external myLib.jar but now myLib.jar cannot find its dependencies anymore .

Unable to run JAR through command line or double click

喜欢而已 提交于 2019-12-24 12:41:33
问题 I was following Ant tutorial and wrote a simple program for log4j.But when I am trying to run the JAR by command line I am unable to do so. Now I am unable to even guess what is the problem. No error is coming up when running JAR via the command line but log file is not updating Log file is updated when app ran in JDeveloper Log file is updated when JAR is ran via Ant script I have already added log4j.properties inside the JAR I have added classpath in commandline About the JAR

Play!: Use different version of jar than local repository

拟墨画扇 提交于 2019-12-24 12:08:20
问题 Play! framework comes with tons of jar libraries. I am using version 1.7 of apache commons-codec for my Play! application. But Play! is already shipped with version 1.4 and some other older versions. I have placed my commons-codec-1.7.jar in the lib folder, and 'eclipsified' so the jar file is in the class path. But when I expand the Project Explorer in Eclipse I see that both version 1.7 and 1.4 are referenced by the application. My questions are How do I remove version 1.4 from being

Error opening tmp PDF from my Java application when run from JAR but not Eclipse

人走茶凉 提交于 2019-12-24 12:05:05
问题 I want to be able to open a PDF file when the user clicks on 'HELP' in my application. The PDF file is located with the JAR, extracted to a tmp directory and then selected to open by awt.Desktop.getDesktop () (to allow for windows and linux use). When I run the app from Eclipse then it works fine, the PDF opens with no errors. When I export to JAR and run then I get an error stating the 'PDF document is damaged', if I navigate manually to the PDF document (on my ubuntu machine /tmp/546434564

gradle war: how to build jar, not classes

徘徊边缘 提交于 2019-12-24 11:44:42
问题 Gradle war plugin: how to build a jar and add it to war? projectRoot/ src/main/java src/main/resources src/main/webapp build a jar (foo.jar) from the java source code and resources. add the jar under the WEB-INF/lib of the war. WEB-INF/lib/foo.jar The war task will not build a jar by default, and add all java classes and resources under WEB-INF/classes. UPDATE The War plugin extends the Java plugin to add support for assembling web application WAR files. It disables the default JAR archive

cannot seem to run jar file

自作多情 提交于 2019-12-24 11:39:08
问题 How do i set the classpath in a unix environment using tsch script. I try to set the path as follows but it gives me errors setenv CLASSPATH $CLASSPATH : path but it doens't work saying -Bad : modifier in $(/). i dont understand why i cannot set this class path. Due to this i cannot run my .jar executable as i want to and i am running out of time. When i try to run the .jar file it give s me the following error new error...it shows this when i try to run the jar file along with the path to

NSIS to set default program to launch specified file type

戏子无情 提交于 2019-12-24 11:37:16
问题 I am using an NSIS script to create an installer for my Java program. My executeable jar is launched from a BAT file. The installer works fine, but I want a specific file type (just for an example ".zip") to always use my app as the default. Right now if I double click the file, I have to browse into "Program Files > Company Name > bat file" and specify to always use this BAT file to launch this file type. Is there a way to specify this in an NSIS script so the user doesnt have to browse and

Apache Spark: Importing jars

余生长醉 提交于 2019-12-24 11:35:54
问题 I am using Apache Spark on my windows machine. I am relatively new to this, and I am working locally before uploading my code to the cluster. I've written a very simple scala program and everything works fine: println("creating Dataframe from json") val sqlContext = new org.apache.spark.sql.SQLContext(sc) val rawData = sqlContext.read.json("test_data.txt") println("this is the test data table") rawData.show() println("finished running") The program executes correctly. I now want to add some

JarInputStream: getNextJarEntry always returns null

守給你的承諾、 提交于 2019-12-24 11:13:15
问题 I have an I18n helper class that can find out the available Locale s by looking at the name of the files inside the application's Jar. private static void addLocalesFromJar(List<Locale> locales) throws IOException { ProtectionDomain domain = I18n.class.getProtectionDomain(); CodeSource src = domain.getCodeSource(); URL url = src.getLocation(); JarInputStream jar = new JarInputStream(url.openStream()); while (true) { JarEntry entry = jar.getNextJarEntry(); if (entry == null) { break; } String