classpath

NoClassDefFoundError with sbt and scala.swing

你说的曾经没有我的故事 提交于 2020-01-02 04:54:05
问题 I'm new to JVM land so I apologize if this is a common problem. I'm using Scala (2.12) with sbt 0.13.13 on OSX. I'm working on a tiny app that depends on the GUI library scala.swing (2.10.x). I ran into a runtime issue almost immediately with example code (http://otfried.org/scala/index_28.html). Specifically, when invoking sbt run I get a stacktrace leading with: [error] (run-main-0) java.lang.NoClassDefFoundError: scala/Proxy$class java.lang.NoClassDefFoundError: scala/Proxy$class at scala

Java class finder Tool

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 02:46:06
问题 Anyone who uses Java regularly knows the amount of trouble multiple jars in classpath can give us. I am looking for a tool which will help me - Search for class files inside jars in Classpath Search for class files inside jars in a specific location Maybe too much to ask for but show me if the same class is present in multiple jars. Also needless to say it should be fast. Most of the tools i have evaluated are very slow and not upto the mark. Any tools for the above purpose greatly

SBT Scaladoc Configuration

给你一囗甜甜゛ 提交于 2020-01-02 01:10:14
问题 I'm trying to configure the Scaladoc in SBT, specifically the title, output directory and classpath. I managed to define the title by adding the following to build.sbt: scalacOptions in (Compile, doc) ++= Opts.doc.title("Scala-Tools") I can't figure out how to change the doc output directory. I also can't figure out how to add jars to classpath. The reason I want to edit the classpath is because it appears the standard Scala library is not getting picked up by scaladoc when I refer to its

how to load the dependencies from the pom into classpath of eclipse project?

跟風遠走 提交于 2020-01-01 11:33:19
问题 Am using eclipse helios with m2eclipse plugin. For a maven project checked out from CVS, how do i tell eclipse to automatically fetch all the jars needed for that project from the dependencies mentioned in the pom. Thanks for your time 回答1: m2eclipse should do this for you (dependencies will be copied to your local repository) and build a valid classpath. I you have any doubts that the resolved dependencies are outdated try <select project> -> Context Menu -> Maven -> Update Dependencies If

Easiest way to manage my CLASSPATH?

和自甴很熟 提交于 2020-01-01 10:50:08
问题 I'm beginning to play with Clojure a bit and my Java experience is pretty limited. I'm coming from the dynamic world of Ruby and OO, so the functional side of things is very interesting! Anyway, as I discover libraries and various tools for use (and the tutorial files for the Pragmatic Clojure Book), everything typically calls for placing files in the CLASSPATH in order for Clojure to see the library for use. Is there such thing as good CLASSPATH practice? Would I ever want to only have a

Method to dump classes on the classpath from inside JVM?

[亡魂溺海] 提交于 2020-01-01 06:26:35
问题 My code is failing with a ClassNotFoundException . I can see that the jar file containing the class is definitely on the classpath from the command prompt execution. Is there a way to dump the list of classes on the classpath from the JVM? (Ideally some Java code). (I don't want to see the classes in a directory, I want to see a list of what is loaded into the JVM). 回答1: That's actually not what you want to see if you're getting a CNFE , since it's not found. Plus not all available classes

How does a classloader load classes reference in the manifest classpath?

冷暖自知 提交于 2020-01-01 04:46:24
问题 I used maven to built a jar with an external classpath additions using addClasspath. When I run that jar using java -jar artifact.jar it is able to load classes from that main jar and from all jars in the libs directory. However if I ask the system property java.class.path it will only list the main jar. If I ask the system class loader for its urls ( ClassLoader.getSystemClassLoader().getURLs() ) it will also only return the main jar. If I ask any class contained in some library for its

How do you configure GroovyConsole so I don't have to import libraries at startup?

人走茶凉 提交于 2020-01-01 03:05:06
问题 I have a groovy script that uses a third party library. Each time I open the application and attempt to run my script I have to import the proper library. I would like to be able to open GroovyConsole and run my application without having to import the library. 回答1: In Linux you also have /usr/share/groovy/conf/groovy-starter.conf Here you can add your specific libs: # load user specific libraries load !{user.home}/.groovy/lib/*.jar load /home/squelsh/src/neo4j-community-1.4.M03/lib/*.jar

Understanding the Eclipse classpath declarations

帅比萌擦擦* 提交于 2020-01-01 02:34:36
问题 I'm trying to understand the Eclipse classpath file, in particular, I want to know this: How is the JRE using it (i.e. is the JVM reading this xml file directly, or is eclipse somehow feeding it into its internal compiler)? How are the complex entries (like the ivy path below) parsed and incorporated into the JVM ClassLoader when I run my classes from my IDE? Context: I have a strange bug which is that eclipse is using the "wrong" version of a class, whereas my ivy / ant build is using the

CLASSPATH vs java.ext.dirs

心已入冬 提交于 2020-01-01 02:13:11
问题 is there any reason why to favor using (possibly very long) CLASSPATH variable to set which jars should be on classpath durign application run then to use the java 1.5+ property -Djava.ext.dirs which specifies whole directory(directories) of jars to be searched? To make it real-life example I have standalone java application with lib folder containig all dependent jars. Sofar the start script is setting all the (maybe 20) jars to CLASSPATH variable one by one. Since now my application archive