Well, so I just tried the following commands: > user=> (ns mx.clojure.contemporary.pitch-centricity-and-symmetry > #_=> (:import [jm.music.data > #_=> Score > #_=> Part > #_=> Phrase > #_=> Note]) > #_=> (:import [jm.music.tools > #_=> Mod]) > #_=> (:import [jm JMC]) > #_=> (:import [jm.util Write])) > jm.util.Write > mx.clojure.contemporary.pitch-centricity-and-symmetry=> > It seems to work, right? :) Have I imported jMusic in a clean way? But I've still a problem with javax :-(
On Monday, May 6, 2013 12:04:39 AM UTC+2, Caocoa wrote: > > Hi all! I'm a new Clojure user. I'm trying to import some java classes in > order to use them with overtone, but I fail :/ Would you help me? > Thanks a lot in advance for your answer. > > Here is the bug: > >> user=> (:import [javax.constraints >> #_=> Problem >> #_=> ProblemFactory >> #_=> Var >> #_=> Solver >> #_=> Objective >> #_=> VarSet]) >> CompilerException java.lang.RuntimeException: >> java.lang.ClassNotFoundException: javax.constraints, >> compiling:(NO_SOURCE_PATH:1) >> >> user=> (:import [jm.music.data >> #_=> Score >> #_=> Part >> #_=> Phrase >> #_=> Note]) >> CompilerException java.lang.RuntimeException: >> java.lang.ClassNotFoundException: jm.music.data, >> compiling:(NO_SOURCE_PATH:1) >> > > As a newbie, I have several questions: > > - I've found jMusic here: > http://sourceforge.net/projects/jmusic/?source=dlp. I hope it's the > latest version. I've copied it in >> >> /usr/lib/jvm/java-7-openjdk/jre/lib/ext >> > but I still can't invoke any jm.music.data classes. How could I > include it int the classpath. I thought that folder was already included. > - How can I download and properly install javax.constraints? I don't > even know where I can find that package. > > Some data about my system: > > - uname -a gives me back: > >> Linux C40C04 3.8.11-1-ARCH #1 SMP PREEMPT Wed May 1 20:18:57 CEST >> 2013 x86_64 GNU/Linux >> > - When I look for jMusic or javax in package database with my package > manager (I use yaourt), I don't find anything. > - Here is what java packages I've already installed: > >> $ yaourt -Qs java >> extra/apache-ant 1.9.0-1 >> A java-based build tool >> extra/ca-certificates-java 20121112+nmu2-1 >> Common CA certificates (JKS keystore) >> extra/eclipse 4.2.2-1 >> An IDE for Java and other languages >> extra/gjs 1.36.1-1 >> Javascript Bindings for GNOME >> local/hsqldb-java 1:1.8.0.10-2 >> HSQLDB Java libraries >> extra/java-activation-gnu 1.1.1-1 >> JavaBeans Activation Framework (JAF), framework for declaring >> what beans operate on what MIME type data >> local/java-commons-email 1.2-1 >> Library for sending e-mail from Java. >> extra/java-gnumail 1.1.2-1 >> GNU implementation of the JavaMail API specification, version 1.3 >> extra/jdk7-openjdk 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - SDK >> extra/jre7-openjdk 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - Full Java runtime environment - needed for >> executing Java GUI and Webstart programs >> extra/jre7-openjdk-headless 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - Minimal Java runtime - needed for executing non >> GUI Java programs >> community/netbeans 7.3-1 >> IDE for Java, HTML5, PHP, Groovy, C and C++$ yaourt -Qs java >> extra/apache-ant 1.9.0-1 >> A java-based build tool >> extra/ca-certificates-java 20121112+nmu2-1 >> Common CA certificates (JKS keystore) >> extra/eclipse 4.2.2-1 >> An IDE for Java and other languages >> extra/gjs 1.36.1-1 >> Javascript Bindings for GNOME >> local/hsqldb-java 1:1.8.0.10-2 >> HSQLDB Java libraries >> extra/java-activation-gnu 1.1.1-1 >> JavaBeans Activation Framework (JAF), framework for declaring >> what beans operate on what MIME type data >> local/java-commons-email 1.2-1 >> Library for sending e-mail from Java. >> extra/java-gnumail 1.1.2-1 >> GNU implementation of the JavaMail API specification, version 1.3 >> extra/jdk7-openjdk 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - SDK >> extra/jre7-openjdk 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - Full Java runtime environment - needed for >> executing Java GUI and Webstart programs >> extra/jre7-openjdk-headless 7.u21_2.3.9-1 >> Free Java environment based on OpenJDK 7.0 with IcedTea7 >> replacing binary plugs - Minimal Java runtime - needed for executing non >> GUI Java programs >> extra/js 17.0.0-1 >> JavaScript interpreter and libraries >> extra/js185 1.0.0-2 >> JavaScript interpreter and libraries (legacy) >> extra/libreoffice-common 4.0.2-3 (libreoffice) >> common files for LibreOffice - a productivity suite that is >> compatible with other major office suites >> community/netbeans 7.3-1 >> IDE for Java, HTML5, PHP, Groovy, C and C++ >> local/saxon-he 9.4.0.7-2 >> XSLT 2.0 / XPath 2.0 / XQuery 1.0 processor for Java - Home >> Edition >> local/saxon6 6.5.5-1 >> XSLT 1.0 / XPath 1.0 processor for Java >> > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.