Leiningen's eclipse plugin is asking for duck streams? - clojure

I'm trying to follow this tutorial on Seesaw Window Building.
During the step of automatically creating eclipse project file I get errors asking for duck_streams.
lein-eclipse doesn't look like it's been updated in 2 years which means it's using the old contrib library. However in the tutorial clojure 1.3.0 is being used.
This leaves me confused as to why the tutorial example works and what I should do to run the lein-eclipse plugin?
$ lein plugin install lein-eclipse 1.0.0
[INFO] Unable to find resource 'lein-eclipse:lein-eclipse:jar:1.0.0' in repository central (http://repo1.maven.org/maven2)
Including lein-eclipse-1.0.0.jar
Created lein-eclipse-1.0.0.jar
$ lein eclipse
Exception in thread "main" java.io.FileNotFoundException: Could not locate clojure/contrib/duck_streams__init.class or clojure/contrib/duck_streams.clj on classpath: (eclipse.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5441)
[snip]
Caused by: java.io.FileNotFoundException: Could not locate clojure/contrib/duck_streams__init.class or clojure/contrib/duck_streams.clj on classpath:
at clojure.lang.RT.load(RT.java:412)
[snip]

I don't know if you found this out, but lein-eclipse is a bit out of date, yet I think you'd be better served by installing the Counterclockwise plugin, which as of version 0.9.0, supports Leiningen projects natively in Eclipse. I use this plugin and Eclipse as my primary development environment, and I like this setup quite a bit.
Counterclockwise
Counterclockwise Update Site

Related

Weka will not open on MacOS

I have installed the latest version of Weka(3.9.3). I have also ensured that both Java and MacOS are up to date on my machine.
When I double-click the Weka icon to open it, it bounces for a few seconds and never opens.
I have downloaded Weka 3.8.3 to see if that makes any difference, but the same thing happened.
Any ideas on why this is happening?
I was facing a similar issue but it worked for me when I start weka on the command line.
Change directory into the weka-3-8-0 directory
cd /Applications/weka-3-8-0
invoke the jvm with the weka.jar file located in the above directory
java -jar weka.jar
We have identified the issue with the WEKA 3.8.3 and WEKA 3.9.3 applications for the Mac that, for many users, caused them to fail to start up via double-clicking.
On December 13, we replaced weka-3-8-3-oracle-jvm.dmg and weka-3-9-3-oracle-jvm.dmg on SourceForge with a new .dmg compatible with older versions of OS X, based on the HFS+ file system. Unfortunately, this new “release" included a pre-17 December 2018 version of the Amazon Corretto JVM 1.8.0_192 instead of the Oracle Java VM we had used before. Unfortunately, that particular version of Amazon’s Corretto had a bug on Macs:
"The libfontmanager in Corretto is linked to the libfreetype in X11 and breaks when X11 is not installed."
See https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/change-log.html.
We never noticed this problem and could not reproduce it because if, like us, you had XQuartz installed, or the libfreetype.dylib library was installed on your Mac via Homebrew, the WEKA application still worked in spite of this bug.
We have reproduced the problematic behaviour by removing XQuartz and Homebrew on one of our Macs. And, indeed, the WEKA macOS application no longer started when the bird was double-clicked.
We have just made new “releases” of the WEKA 3.8.3 .dmg and the WEKA 3.9.3 for the Mac that use the latest version of Corretto 8 (8.212.04.2). You can find these .dmg files at
https://sourceforge.net/projects/weka/files/weka-3-8/3.8.3/
and
https://sourceforge.net/projects/weka/files/weka-3-9/3.9.3/
respectively.
They are called
weka-3-8-3-corretto-jvm.dmg
and
weka-3-9-3-corretto-jvm.dmg
respectively.
We have also replaced the links for the Mac applications on the main WEKA downloads page at
https://www.cs.waikato.ac.nz/ml/weka/downloading.html

Cannot use Clojure 1.7 with Leiningen

Using Leiningen, I'm unable to use Clojure 1.7 in project, but I am able to use later versions.
For instance, if I clone down the Om Next Tutorial and try to run it, I get a java.lang.NoClassDefFoundError: clojure/lang/Tuple. Full stack trace here. A similar error occurs any time I try to use Clojure 1.7 in a project with Leiningen.
However, the error goes away if I upgrade to Clojure 1.8 or 1.9 in project.clj. The trouble is that I'm not always in a position to upgrade the version on a project.
Versions installed:
Clojure: 1.8.0
Java: OpenJDK 1.8.0_171
Leiningen: 2.8.1
Ubuntu: 16.04 LTS
The problem happens with or without my lien profiles.clj.
I'm not a Java expert, but this looks like a classpath issue to me. I am using update-java-alternatives to set the path to Java 1.8.
Edit: I created a minimal repo that reproduced the problem, using the very first part of the Om Next tutorial, here.

How to install Qt 3.3.8 in Ubuntu 14.04

Just recently I have begun to review the code for a project produced by a friend roughly 4 years ago. However, to compile this project I need an outdated version of Qt (version 3.3.8). Much of the code used in this project isn't supported in the same style as Qt4. So I'd first like to obtain Qt3 before I transition to Qt4.
Ubuntu has decided to no longer carry "qt3-dev-tools". Ubuntu has limited the selection to "qt4-dev-tools" in its repository. So installing via the command line option (sudo apt-get install qt3-dev-tools) results in an error:
"Unable to locate package qt3-dev-tools."
So, from here I did some digging for a manual installation? I found a great website to help me through the process, but I'm not very knowledgeable about Ubuntu, or Linux in general. Step 1 was simple. But step 2 and onward stumped me. I'm supposed to be both adding the environment variables listed in step two to the .profile file and then setting them, correct?
In step 2, is logging in again just meant for users with the .login shell? When I type in $HOME/.qt-license of step three, I suppose I'm typing this into the terminal?. Same with the ./configure? Both of these commands return no such file exists.
Does anyone know a better walk through to install Qt3 files, or can give a quick breakdown of this tutorial?
The website tutorial:
http://krm.am.gdynia.pl/doc/qt-3.3.8/INSTALL
If u can get .rpm package then open it in ubuntu software centre . It will get installed.
http://download.qt.io/archive/qt/3/ try downloading the package for qt3 from this qt archive & install it.

How to run leiningen from IntellijIdea?

I installed IntelliJ Idea 10.5.2 with the plugins La Clojure and Leiningen. Installed Leiningen after that, as mentioned in GitHub page (took the bat, cause I'm running on Windows 7, and did a self install; I also put the path to the bat in the PATH variable)
Now, running anything in Leiningen yeilds this error:
E:\leiningen\lein.bat deps Error opening registry key
'Software\JavaSoft\Java Runtime Environment' Error: could not find
java.dll Error: could not find Java SE Runtime Environment.
So, the question is "What is wrong here?" I tried following all steps on installing Leiningen the right way. Still does not work fully.
If I go to where my project is from within a Windows command prompt, then I can run lein commands. It works that way. But I want to run from within the plugin in IntelliJ.
Also, another weird thing I noticed is that if I startup a Total Commander, go to my project and start a Command Prompt from there and then try running any lein commands, I get the same error.
My guess is something might be wrong with the classpath, but what? And how to fix it?
This is not a problem with the classpath, but a problem with starting Leiningen through the IntelliJ Leiningen plugin not being able to find a correct Java version.
Since it depends on the host process that launches Lein if it can start the JDK or not, it could be a difference in 'bitness' under Win 7 x64. If you have only one 32 or 64 bit JDK installed, some programs try start only one, because the other is 'shielded' away.
This is done internally by Win 7 through the x86 or x64 parts of the registry or default program files dirs. If the host process is 32 or 64 bits it can only find programs or dll's from the same 'bitness'. For program files this is either \Program Files\ for x64 and \Program Files (x86)\ for x86, and for the registry \HKEY_LOCAL_MACHINE\SOFTWARE\ for x64 and \HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ for x86.
Easiest to find out is install the other (x86 or x64) version of the JDK and JRE as well. This will register that version in the other part of the registry and program files dir.

IllegalStateException Compiling Clojure-Contrib

I am trying to compile my own version of clojure-contrib with Maven I get the following exception:
Exception in thread "main" java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: clojure.contrib.pprint/*format-str*, compiling:(dispatch.clj:90)
I am also using the following command to compile it:
mvn package -Dclojure.jar=/usr/local/share/jars/clojure.jar
clojure.jar is link to the actual jar (that is on the same directory) because I am using a version that I compiled from the Git repository.
Any Ideas?
Thanks in advance for your comments! =)
clojure-contrib, the single monolithic build, is deprecated after Clojure 1.2.0 and is not actively maintained. It doesn't build on the latest Clojure 1.3.0-alpha* releases.
New contrib libraries, one per Github repository, are being created under http://github.com/clojure
See http://dev.clojure.org/display/design/Clojure+Contrib and its sub-pages for more information.