classpath

how to execute a built fat JAR as a gradle task?

蹲街弑〆低调 提交于 2019-12-12 04:15:47
问题 How would I utilize the gradle application plugin to execute the fat JAR from gradle as so: thufir@doge:~/NetBeansProjects/selenium$ thufir@doge:~/NetBeansProjects/selenium$ gradle clean fatJar;java -jar build/libs/selenium-all.jar BUILD SUCCESSFUL in 23s 4 actionable tasks: 4 executed Jul 18, 2017 7:47:49 PM net.bounceme.dur.web.selenium.Main main INFO: running.. 1500432473386 geckodriver INFO Listening on 127.0.0.1:30879 1500432475320 geckodriver::marionette INFO Starting browser /usr/lib

Run scala script from shell script

梦想的初衷 提交于 2019-12-12 03:56:43
问题 I have a Scala project that contains both Scala classes/objects as well as scripts. I am trying to run the scripts (that use the classes/objects to perform various actions) from command line. The way I am looking to do this is to create a shell that would be passed as argument the name of the script, as well as the arguments that the script itself takes. My folder structure is as follows: runner.sh -> script I am trying to implement to run the Scala scripts bin/ -> script I am trying to

How to specify the classpath to the acceleoCompiler ant task to compile mtl files

二次信任 提交于 2019-12-12 03:55:10
问题 I'm trying to compile Acceleo mtl files using an Ant task: <target name="compileEmtsFiles"> <echo>...... Running Acceleo mtl=emtl file compilation</echo> <acceleoCompiler sourceFolder="src/main/java" outputFolder="build/classes/main" binaryResource="false" dependencies="" packagesToRegister="com.company.MyAcceleoPackage"> </acceleoCompiler> <echo>...... Finished Acceleo mtl=emtl file compilation</echo> </target> But the acceleoCompiler seems to have a problem to find the "com.company

Why does my IDE find the JAR but my command line doesn't? [duplicate]

主宰稳场 提交于 2019-12-12 03:44:29
问题 This question already has an answer here : How come command line isn't recognizing this java command? (1 answer) Closed 6 years ago . I've tried searching around, but I couldn't find any answers that fit my case. I can run the file CB.java just fine when I use an IDE. This file depends on classes specified in cs2.jar. Here are the contents of its directory. 02/12/2013 03:43 PM <DIR> . 02/12/2013 03:43 PM <DIR> .. 02/12/2013 03:45 PM 2,226 CB.class 02/12/2013 01:21 PM 2,164 CB.java 02/12/2013

Classpath option works for javac but not for java (Windows)

匆匆过客 提交于 2019-12-12 03:28:52
问题 Hi and thanks for reading, after usually working with C# I tried writing some java code yesterday to process an XML file. I didn't use an IDE or anything, just Notepad++, SDK and a lot of Google :) I needed to include some jar files for which I found out, that one needs to set the classpath as a command line parameter to find the jar file. That worked well: javac -cp "./metadata-extractor-2.9.1.jar;./xmpcore-5.1.2.jar" DescribeIt.java Although using the same syntax when running it with java

Error with Slf4j and classpath

老子叫甜甜 提交于 2019-12-12 03:09:45
问题 I would execute a maven project but my classpath is not correct... I tried many possibilities without find any solution. The compilation is successfull, but when I start the program, I have this following error : [root@sandbox kafka-log-appender]# java -cp "target/kafka-log-appender-1.0-SNAPSHOT.jar:log4j-1.2.17.jar" com.log.kafka.RogueApplication Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at com.log.kafka.RogueApplication.<clinit>(RogueApplication.java

Unexplained ArrayStoreException - Code or Configuration Issue

安稳与你 提交于 2019-12-12 02:25:32
问题 I am trying to debug an application that is working properly when tested locally on a Windows XP machine (version 5.1 build 2600 Service Pack 3) through Websphere Platform 6.1 running java version 1.5. This application is throwing an ArrayStoreException when it is deployed to UNIX servers (SunOS, version 5.10) running java version 1.5.0_24. I am leaning towards this being an environment configuration issue, but (other than it working locally) I can't seem to confirm that it's a configuration

Mallet SimpleTagger Classpath

那年仲夏 提交于 2019-12-12 01:57:10
问题 I am going to use Mallet SimpleTagger for sequence tagging. However, I have problem with setting the classpath. As I have seen here: classpath I must be able to use java -cp to set the classpath. I followed the instructions here (I am sure that I have installed Ant and Mallet correctly). However, I receive this message: Error: could not find or load main class cc.mallet.fst.SimpleTagger Here is the real code that I use: C:\mallet> java -cp "C:\mallet\class:C:\mallet\lib\mallet-deps.jar" cc

Despite having commons-lang included in pom, getting exception java.lang.NoSuchMethodError:org.apache.commons.lang.StringUtils.join

房东的猫 提交于 2019-12-12 01:53:13
问题 I have the following String pattern = "\\b(" + StringUtils.join(mypattern, "|") + ")\\b"; and in pom.xml, I have dependency for <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> However when I execute, I am getting the following errors inspite of having commons-lang java.lang.NoSuchMethodError:org.apache.commons.lang.StringUtils.join (Ljava/util/Collection;Ljava/lang/String;)Ljava/lang/String; How can I resolve this issue?

Adding a global resource folder to gradle build to be made available for subprojects

你说的曾经没有我的故事 提交于 2019-12-12 01:52:21
问题 I have a gradle project which consists of a number of subprojects. I want to add a resource folder which is in the same folder as the subprojects to be on the classpath of all the projects when they run. The folder structure kinda looks like: root |__subproject1 |__subproject2 |__subproject3 |__global_resources I've tried doing something like in the root build.gradle : allprojects { processResources { from("$rootProject/global_resources/") } } Or this: subprojects { dependencies { runtime