I have been programming for a while with Ruby and I really enjoy it. Lately I started having the need of compiling some ruby code. For several reasons using Ruby2exe is not an option for me. So I decided to give Jruby a try (generating a jar would be good enough).
I am using windows and I installed java JDK 6u17 (at C:\Program Files\Java\jdk1.6.0_17).
I installed jruby 1.4 at C:\jruby
I created a hello world in java, compile and executed it just fine (so java works fine).
I created a file "script.rb" with:
puts "Hello, world"
I run this program with jruby:
jruby script.rb
And it works fine.
I did set JAVA_HOME to C:\Program Files\Java\jdk1.6.0_17
I also successfully run:
java -jar c:\jruby\lib\jruby.jar script.rb
I then compile with the command:
jruby -S jrubyc script.rb
It generates the class 'script.class'
My problem is that I found no way to properly execute script.class
I try:
java -cp .:c:\jruby\lib\jruby.jar script
And I get the error message:
Exception in thread "main" java.lang.NoClassDefFoundError: script
Caused by: java.lang.ClassNotFoundException: script
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: script. Program will exit.
I also tried copying jruby-complete-1.4.0.jar to local dir as well as several other options.
Anyone know what am I doing wrong?
Assuming you are on windows, I think your -cp arg is wrong: it should be semi-colon delimited:
java -cp .;c:\jruby\lib\jruby.jar script
But also, I had better luck by setting the CLASSPATH env separately, e.g.:
C:\ruby>set CLASSPATH=c:\Program Files\jruby-1.4.0\lib\jruby.jar;
C:\ruby>java hello_world
Hello, world!
But perhaps that's because my classpath needs a space in it.
What version of JRuby are you using? As you can see, I'm on 1.4.
Related
I'm using Eclim to get auto-completion for Java, Ruby, etc in Vim. It starts an instance of Eclipse. Eclipse still thinks I have RVM installed for some reason (I use rbenv now). Any idea how I should get rid of this configuration problem or work-around this error?
2014-06-22 22:43:10,123 INFO [org.eclim.plugin.jdt.PluginResources] Setting 'JRE_SRC' to '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/src.zip'
org.eclipse.core.runtime.CoreException: Exception occurred executing command line.
at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:875)
at org.eclipse.dltk.internal.launching.execution.LocalExecEnvironment.exec(LocalExecEnvironment.java:72)
at org.eclipse.dltk.launching.ScriptLaunchUtil.runScriptWithInterpreter(ScriptLaunchUtil.java:85)
at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.generateLines(RubyGenericInstall.java:70)
at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.load(RubyGenericInstall.java:171)
at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.getSources(RubyGenericInstall.java:144)
at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall.getBuiltinModules(RubyGenericInstall.java:246)
at org.eclipse.dltk.internal.core.BuiltinProjectFragment.isSupported(BuiltinProjectFragment.java:97)
at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:673)
at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:605)
at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:565)
at org.eclipse.dltk.internal.core.ScriptProject.getAllProjectFragments(ScriptProject.java:2921)
at org.eclipse.dltk.internal.core.ScriptProject.getAllProjectFragments(ScriptProject.java:2915)
at org.eclipse.dltk.core.search.indexing.core.ProjectRequest.run(ProjectRequest.java:67)
at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:76)
at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:467)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Cannot run program "/Users/ivan/.rvm/rubies/ruby-2.0.0-p195/bin/ruby" (in directory "/var/folders/nh/07hs5mmj0hs7fdq3181dwpbc0000gn/T/dltk60850.tmp/scripts"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:620)
at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:871)
... 16 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:185)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 18 more
Eclim uses .buildpath for projects to set configurations. Check to make sure there aren't any remnant rvm / ruby configuration files left in any of your current active/existing projects in Eclipse.
Eclim uses .buildpath files to set the configuration for each project. There was an old project on my hard drive that had a reference to an rvm ruby in the text of the .buildpath file. It can be really hard to track down all old projects without the use of a file find utility such as locate. For this particular issue, I used locate buildpath | xargs grep rvm to search each buildpath file for the string rvm. Because the stack trace does not point to the project or build path file, only by doing this kind of search was I able to resolve the issue.
I'm using OpenEJB in my JUnit tests. It worked fine with jdk7. Unfortunately, it does not start with jdk1.8.0. Any ideas?
C:\javaapps\jdk1.8.0\bin\java
...
10:31:11 SEVERE org.apache.openejb.util.OpenEJBErrorHandler handleUnknownError FATAL ERROR: Unknown error in Assembler. Please send the following stack trace and this message to users#openejb.apache.org :
java.lang.IllegalArgumentException
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
at org.apache.openejb.util.AnnotationFinder.readClassDef(AnnotationFinder.java:297)
at org.apache.openejb.util.AnnotationFinder.find(AnnotationFinder.java:163)
at org.apache.openejb.config.DeploymentLoader.checkAnnotations(DeploymentLoader.java:1871)
at org.apache.openejb.config.DeploymentLoader.discoverModuleType(DeploymentLoader.java:1782)
at org.apache.openejb.config.DeploymentsResolver.processUrls(DeploymentsResolver.java:388)
at org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(DeploymentsResolver.java:301)
at org.apache.openejb.config.ConfigurationFactory.getModulesFromClassPath(ConfigurationFactory.java:647)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:524)
at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:575)
at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:429)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:408)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:65)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:276)
yeah, asm used is not compatible with java 8 yeat, should be the case pretty soon btw, hope to get it for 4.7.0
i would guess that the asm library supplied with EJB is not java8 compatible. the java class file format has some new features, and it looks like asm4 is having some problems with it.
I installed jython 2.7 beta 1 on Windows and copied its JYTHON_HOME/bin/jython shell script into a $PATH-visible location for MSYS, but calling
$ jython
doesn't work, with this error:
java.lang.NoClassDefFoundError: org/python/util/jython
Caused by: java.lang.ClassNotFoundException: org.python.util.jython
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.python.util.jython. Program will exit.
Exception in thread "main"
Having a look at this jython shell script (which I renamed jython.sh), I see it expects either Cygwin or Darwin.
At the beginning of the file I added
export JAVA_HOME='/c/Programs/JavaRE/6u31'
export JYTHON_HOME='/c/Programs/jython2_7b1'
And then where it said
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin) darwin=true;;
esac
I replaced with
case "`uname`" in
CYGWIN*) cygwin=true;;
MINGW*) cygwin=true;;
Darwin) darwin=true;;
esac
But it still doesn't work, with:
$ jython.sh test.j.py
/c/Programs/Path/jython.sh: line 265: /cygdrive/c/Programs/JavaRE/6u31/bin/java: No such file or directory
Internally the jython.sh script uses cygpath, but MSYS doesn't have that, so it falls back on Cygwin's, leading to the above error. How to resolve this?
The solution was to get MSYS's own version of cygpath from here: http://sourceforge.net/projects/cbadvanced/files/Msys%20Specific/cygpath-enhanced.7z/download
And put it into MSYS's /bin
Then running a script like this, works:
$ jython.sh test.j.py
More discussion about MSYS's cygpath.exe here, including why it's not needed: http://mingw.5.n7.nabble.com/enhanced-version-of-cygpath-td28556.html
(To be fair, if it were included in MSYS, then projects will start to rely on it, which is not necessarily the best idea ever.)
Thanks to this answer for the pointer: https://stackoverflow.com/a/18488099/1143274
I am trying to run PigUnit tests on a Windows 7 machine before running the actual pig script on a Ubuntu cluster and I start to think that my understanding of "withouthadoop" is not correct.
Do I need to install Hadoop to locally run a PigUnit test on a Windows 7 machine?
I installed:
eclipse Juno & ant
cygwin
I set up:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_39
PIG_HOME=C:\Users\john.doe\Java\eclipse\pig
PIG_CLASSPATH=%PIG_HOME%\bin
I created using eclipse's Ant builder jar-all and pigunit-jar:
pig.jar
pig-withouthadoop.jar
pigunit.jar
Still when I type pig -x local in cygwin I get:
$./pig -x local
cygpath: can't convert empty path
Exception in thread "main" java.io.IOException: Error opening job jar: /usr/lib/pig/pig-withouthadoop.jar
at org.apache.hadoop.util.RunJar.main(RunJar.java:135)
Caused by: java.io.FileNotFoundException: \usr\lib\pig\pig-withouthadoop.jar (the systen cannot find the given path)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:136)
at java.util.jar.JarFile.<init>(JarFile.java:73)
at org.apache.hadoop.util.RunJar.main(RunJar.java:133)
When I try to run the test from http://pig.apache.org/docs/r0.10.0/test.html#pigunit from within eclipse using the option "Run as JUnit", I get:
java.io.IOException
at org.apache.pig.pigunit.pig.PigServer.registerScript(PigServer.java:62)
at org.apache.pig.pigunit.PigTest.registerScript(PigTest.java:171)
at org.apache.pig.pigunit.PigTest.assertOutput(PigTest.java:267)
at org.apache.pig.pigunit.PigTest.assertOutput(PigTest.java:262)
at da.utils.pigunit.PigUnitExample.testTop2Queries(PigUnitExample.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I am starting to think that I missed some crucial basic information to run Pig on Windows, I have to say also that I am no experienced user with Windows 7 and cygwin, I come from the Unix world.
Don't fight it. Install Hadoop HDInsight server on Windows from the Web Platform installer:
http://www.microsoft.com/web/downloads/platform.aspx
It doesn't take long or take up that much space, and the whole shebang is just set up and running for you. I can't get Pig scripts to take parameters, and there's no HBase, but you get HDFS, Pig, Hive. You can even get a whole local cluster going if just follow:: http://social.msdn.microsoft.com/Forums/en-US/hdinsight/thread/885efc22-fb67-4df8-8648-4ff38098dac6/
I have installed pig 0.12 in cygwin (I run windows 7 64-bit) without installing hadoop. As far as I can see, the steps I followed where:
Install Cygwin64 (with Perl package)
Download pig-0.12.1.tar.gz, copy to home folder
Extract to home folder in cygwin:
$ tar xzf pig-0.12.1.tar.gz
Export JAVA_HOME:
$ export JAVA_HOME=/cygdrive/c/Program\ Files/Java/jre6/
Add pig to path:
$ export PATH=~/pig-0.12.1/bin/:$PATH
Rename pig-0.12.1.jar to pig.jar:
$ cp pig-0.12.1.jar pig.jar
Export PIG_CLASSPATH:
$ export PIG_CLASSPATH=~/pig-0.12.1/pig.jar
Run pig in local mode (start Grunt):
$ pig -x local
There will be a warning:
"cygpath: cannot create short name of C:\cygwin64\home\xxx\pig-0.12.1\logs"
We can remove it simply by running:
$ mkdir logs
Like you, I'm trying at the moment to get a functioning Pig installation on a Windows PC using cygwin in order to learn Pig Latin using small datasets on a single JVM. Not a huge ask, you would have thought, but the pain is almost unbearable. I come from a Windows background and the UNIX part is the steep learning curve for me. The pig-withouthadoop jar doesn't contain hadoop, so hadoop needs to be already installed on your machine to use it; the pig.jar contains pig's own version of hadoop and so is the one to use if hadoop is not already installed on your machine. This is the way I understand it, and it seems to be born out by dumping a list of the contents of each .jar to a text file and viewing the results in Notepad++ .
When you type pig -x local at cygwin's dollar prompt, the bash command script 'pig' is invoked and run. Have a look at it (from your PIG_HOME) with $cd bin $ cat pig. I've been right through it these last few days with vim (!) and near the end of the code is a little fork for cygwin users, in order to cast environment variables, that up until now have been in Unix format, into a form that the Windows version of java.exe will understand when 'exec java ...' is called right at the end of the script. Without this conversion, the Windows java.exe won't understand its parameters:
'#' cygwin path translation
if $cygwin; then
CLASSPATH=cygpath -p -w "$CLASSPATH"
PIG_HOME=cygpath -d "£PIG_HOME"
PIG_LOG_DIR=cygpath -d "$PIG_LOG_DIR"
fi
Cygpath is a cygwin utility that converts UNIX-style file paths into Windows-style file paths, and vice versa. The error message: "cygpath: can't convert empty path" must come from here, I think. Check that CLASSPATH, PIG_HOME and PIG_LOG_DIR aren't empty, perhaps by placing your own echo commands in the script.
On my machine and installation, there was an error generated here, but not the same as yours. I found replacing -w and -d with -m, which makes cygpath use the C:/Program Files/Java... syntax conversion, worked. But then other problems appear, which I shall leave for my own question.
According to this note [1], it is not possible to use the Hadoop native libraries on windows 7 directly using Cygwin:
Hadoop native library is supported only on *nix platforms only. Unfortunately it is known not to work on Cygwin [...]
I have traced down the error message cygpath: can't convert empty path to the line JAVA_LIBRARY_PATH=cygpath -w "$JAVA_LIBRARY_PATH" in hadoop-config.sh which I commented out following the advice from [2]
Comment some translation in hadoop-config.sh.
#if $cygwin; then
#HADOOP_PREFIX=`cygpath -w "$HADOOP_PREFIX"`
#HADOOP_LOG_DIR=`cygpath -w "$HADOOP_LOG_DIR"`
#JAVA_LIBRARY_PATH=`cygpath -w "$JAVA_LIBRARY_PATH"`
#fi
Now I get the following error:
Error before Pig is launched -- ERROR 2999: Unexpected internal error.
java.lang.UnsupportedOperationException: Not implemented by the DistributedFileSystem FileSystem implementation
So the conclusion I draw from this, is that Pig, even in local mode, requires the HDFS. And the HDFS requires the Hadoop native libraries. And the native libraries are known not to work on Cygwin. Hence: IMHO, Pig cannot run using Cygwin as it is.
To run PigUnit on Windows 7. I don't install Cygwin.
Thanks for Konstantin Kudryavtsev i use his FixHadoopOnWindows.runFix()
http://simpletoad.blogspot.com/2013/05/pigunit-issue-on-windows.html
I call the runFix in my setUp, for example
private static PigTest test;
#BeforeClass
public static void setUp() throws IOException, ParseException {
try {
FixHadoopOnWindows.runFix();
// TODO: load pig script properly
test = new PigTest("src/pig/example.pig");
//test.override(...);
}
catch (Exception e) {
}
}
Use maven, need the following dependency
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.pig</groupId>
<artifactId>pig</artifactId>
<version>0.15.0</version>
</dependency>
<dependency>
<groupId>org.jboss.forge</groupId>
<artifactId>forge-javassist</artifactId>
<version>2</version>
</dependency>
<dependency>
<groupId>org.apache.pig</groupId>
<artifactId>pigunit</artifactId>
<version>0.15.0</version>
<scope>test</scope>
</dependency>
Just installed Leiningen 2.1.2 (lein.bat) on Windows XP in D:\lein\, added this dir to path.
Then I started repl
D:\lein>lein repl
and it runs fine.
Also it runs in other dir and can execute commands well.
Then i made sample project 'helloworld':
D:\lein>lein new app helloworld
Lein made project dir with sample app.
Then I go to project dir with
D:\lein>cd helloworld
And now i run command inside project folder:
D:\lein\helloworld>lein repl
and get this error:
Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.Ru
ntimeException: EOF while reading string
at clojure.lang.LispReader.read(LispReader.java:220)
at clojure.core$read.invoke(core.clj:3407)
at clojure.core$read.invoke(core.clj:3405)
at clojure.main$eval_opt$fn__6602.invoke(main.clj:306)
at clojure.main$eval_opt.invoke(main.clj:306)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$script_opt.invoke(main.clj:353)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:3894)
at clojure.lang.Var.invoke(Var.java:527)
at clojure.lang.AFn.applyToHelper(AFn.java:410)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: EOF while reading string
at clojure.lang.Util.runtimeException(Util.java:219)
at clojure.lang.LispReader$StringReader.invoke(LispReader.java:461)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
at clojure.lang.LispReader.read(LispReader.java:185)
... 12 more
Exception in thread "Thread-1" clojure.lang.ExceptionInfo: Subprocess failed {:e
xit-code 1}
at clojure.core$ex_info.invoke(core.clj:4327)
at leiningen.core.eval$fn__2654.invoke(eval.clj:213)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:283)
at leiningen.repl$start_server.invoke(repl.clj:117)
at leiningen.repl$server$fn__6110.invoke(repl.clj:173)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:617)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1788)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:621)
at clojure.core$bound_fn_STAR_$fn__4102.doInvoke(core.clj:1810)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Unknown Source)
REPL server launch timed out.
I feel I missed something or my system messed somehow. Anyone have ideas?
SOLVED
Installed JDK instead of JRE and it works ok.
ALSO
Problem can raise when 'java.exe' from jre-s comes first on the path, i have cleaned system by recursively looking 'where' java.exe is and removing its presence from path everywhere except jdk path.
It can be :
under windows\system32 folder /just delete it from there
under jdk-s path-s /just remove that path-s from $PATH variable
You have to change lein version in your script lein.bat from 2.1.3 to 2.1.0 LEIN_VERSION=2.1.0 then enter the command lein self-install in the command prompt
This worked for me:
remove directory %home%.lein with all contents/files under it
download win installer http://leiningen-win-installer.djpowell.net/
install leiningen
run repl like this:
[WINKEY + R]
CMD.EXE [ENTER]
C:>\ lein repl
Upgrading from jdk 1.6 to jdk 1.7 fixed that problem for me.