classpath

multiple versions of javamail jar causing NoSuchProviderException

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 17:04:28
问题 I have a standalone library ( jar file) that is added to the application server classpath to monitor all the running applications in the JVM and send email when some issue happens. the jar file have all the dependencies bundled in the jar (using the maven-shade-plugin) including the javamail jar file. When one of the other webapplications in the appserver have javamail as a dependency, some dependency conflict happens with the javamail in my jar file and I get an exception MessagingException

NoClassDefFoundError while running a java program in terminal from IDE

蓝咒 提交于 2019-12-24 15:26:03
问题 I am having trouble running a java program that works fine in the IntelliJ IDEA ide. The error I get when I run the same code (after removing the package ..) as follows Exception in thread "main" java.lang.NoClassDefFoundError: fcrypt Caused by: java.lang.ClassNotFoundException: fcrypt at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader

Ant can't find an ant class (DateUtils) while building

五迷三道 提交于 2019-12-24 13:03:42
问题 I'm trying to get a project to build via ant. It builds just fine via ant on my local machine, but on our build machine I get : java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils at org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:323) at org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:170) at org.apache.tools.ant.Project.fireBuildFinished(Project.java: at org.apache.tools.ant.Main.runBuild(Main.java:778) at org.apache.tools.ant.Main

Ant can't find an ant class (DateUtils) while building

拥有回忆 提交于 2019-12-24 12:55:09
问题 I'm trying to get a project to build via ant. It builds just fine via ant on my local machine, but on our build machine I get : java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils at org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:323) at org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:170) at org.apache.tools.ant.Project.fireBuildFinished(Project.java: at org.apache.tools.ant.Main.runBuild(Main.java:778) at org.apache.tools.ant.Main

Java classpath used by Spring

大兔子大兔子 提交于 2019-12-24 12:51:11
问题 I know a way to print the classpath of a project at runtime like here: http://www.mkyong.com/java/how-to-print-out-the-current-project-classpath/ But sometimes the main is even too late, for example when using spring. Is there a way to print something(e.g. classpath) even before Spring starts the injection process? Providing some context, i am running a unit test in spring as follows: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/jmsAppContext.xml")

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

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

Can I use the classpath to override a file in a jar that is being run?

只谈情不闲聊 提交于 2019-12-24 10:37:28
问题 I have a JAR file that contains an application as well as configuration files for that application. The application loads configuration files from the classpath (using ClassLoader.getResource() ), and has its dependencies completely satisfied using the configuration files baked into the JAR file. On occasion I want the application to be run with a slightly different configuration (specifically I want to override the JDBC URL to point to a different database) so I create a new configuration

import org.apache error, (http client)

血红的双手。 提交于 2019-12-24 09:57:37
问题 This question is almost 100% alike with mine. How to import "HttpClient" to Eclipse? I am just wondering what .jar file they are talking about in the response. When I download the example code I see .jar files in the lib folder. I right click on my project and go to properties----> add external jars and add them to my project but this does not work. Can someone please help? Thanks Edit: I downloaded the Binary file from http://hc.apache.org/downloads.cgi and used the jar files there Also I

Java Code: Missing classpath from webapp but no issues in desktop app

*爱你&永不变心* 提交于 2019-12-24 09:08:23
问题 I am trying to read the property filenames under my resources folder (src/main/resources) with the below code final String classPath = System.getProperty("java.class.path", "."); System.out.println(classPath); Above code is working perfectly file in a desktop application but in web application above System.out.println is giving me this output: /C:/Development/INSTALLED/apache-tomcat-8.0.46/bin/bootstrap.jar /C:/Development/INSTALLED/apache-tomcat-8.0.46/bin/tomcat-juli.jar /C:/Program%20Files