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.
Related
IntelliJ IDEA suddenly wouldn't open on my Mac (Intel). The app icon bounces but then nothing happens—no crash report or any kind of message—and there's nothing in Activity Monitor or ps.
Then I tried running it from terminal and got this:
$ /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
2023-02-08 07:47:52.953 idea[10131:63714] allVms required 1.8*,1.8+
2023-02-08 07:47:52.955 idea[10131:63717] Current Directory: /Applications/IntelliJ IDEA.app/Contents/MacOS
2023-02-08 07:47:52.955 idea[10131:63717] Value of IDEA_VM_OPTIONS is (null)
2023-02-08 07:47:52.955 idea[10131:63717] fullFileName is: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.955 idea[10131:63717] fullFileName exists: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.956 idea[10131:63717] Processing VMOptions file at /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.956 idea[10131:63717] Done
Error occurred during initialization of VM
java.lang.NoClassDefFoundError: com/intellij/util/lang/UrlClassLoader
at java.lang.ClassLoader.defineClass1(java.base#11.0.13/Native Method)
at java.lang.ClassLoader.defineClass(java.base#11.0.13/ClassLoader.java:1017)
at java.security.SecureClassLoader.defineClass(java.base#11.0.13/SecureClassLoader.java:174)
at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base#11.0.13/BuiltinClassLoader.java:800)
at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base#11.0.13/BuiltinClassLoader.java:698)
at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base#11.0.13/BuiltinClassLoader.java:621)
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:579)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.13/Native Method)
at java.lang.Class.forName(java.base#11.0.13/Class.java:398)
at java.lang.ClassLoader.initSystemClassLoader(java.base#11.0.13/ClassLoader.java:1976)
at java.lang.System.initPhase3(java.base#11.0.13/System.java:2074)
Caused by: java.lang.ClassNotFoundException: com.intellij.util.lang.UrlClassLoader
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:581)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.ClassLoader.defineClass1(java.base#11.0.13/Native Method)
at java.lang.ClassLoader.defineClass(java.base#11.0.13/ClassLoader.java:1017)
at java.security.SecureClassLoader.defineClass(java.base#11.0.13/SecureClassLoader.java:174)
at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base#11.0.13/BuiltinClassLoader.java:800)
at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base#11.0.13/BuiltinClassLoader.java:698)
at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base#11.0.13/BuiltinClassLoader.java:621)
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:579)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.13/Native Method)
at java.lang.Class.forName(java.base#11.0.13/Class.java:398)
at java.lang.ClassLoader.initSystemClassLoader(java.base#11.0.13/ClassLoader.java:1976)
at java.lang.System.initPhase3(java.base#11.0.13/System.java:2074)
I tried various things I read online:
I tried removing idea.vmoptions in /Applications/IntelliJ\ IDEA.app/Contents/MacOS/ as well as ~/Library/Application\ Support/JetBrains/<product>/.
I restored them but checked that -Xmx was not smaller than -Xms.
I tried deleting plugins.
I tried restoring the JDK and messing with PATH and environment.
Possible causes were updating from macOS Ventura 13.1 to 13.2 yesterday. Or, installing the bined plugin yesterday.
Self-answering to help people. Try simply upgrading to the latest IntelliJ IDEA.
For some reason it was the last thing I tried, i.e. downloading the latest .dmg and installing (dragging into Applications and replacing previous version). I was on Ultimate so I downloaded Ultimate, but if you're on CE (Community Edition) you should download that. I guess in the past upgrading IntelliJ caused things to break for me, so I avoided it until I tried everything else. But this time it was the solution. Also for some reason none of the threads I read online mentioned this as the solution—maybe too obvious but hey, I would have tried it sooner if I read it.
I have windows 10 machine, and JDeveloper 12.2.1.4.0 , when i try to run the weblogic server for the first time i get this error :
Adding environment variable to WLST script USER_MEM_ARGS = -Xms32m -Xmx1024m -XX:MaxPermSize=384m
Log File: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain.log
Label: JDEVADF_PT.12.2.1.4.0_GENERIC_190911.2248.S
Product Home: D:\Oracle\Middleware\BPM_12.4\jdeveloper\jdev\
Domain: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\DefaultDomain
BuildDefaultDomain1.py 2020-06-05 09:14:45
cmd.exe /c ""D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py""
Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at oracle.jdevimpl.adrs.weblogic.wlst.ScriptRunnerImpl.runScript(ScriptRunnerImpl.java:106)
at oracle.jdevimpl.adrs.weblogic.builder.DomainScriptRunnerImpl.runScript(DomainScriptRunnerImpl.java:146)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.createDomain(DefaultDomainBuilder.java:606)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.build(DefaultDomainBuilder.java:274)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder$1.run(DefaultDomainBuilder.java:225)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused by: java.lang.IllegalArgumentException: Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessImpl.needsEscaping(ProcessImpl.java:279)
at java.lang.ProcessImpl.createCommandLine(ProcessImpl.java:202)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:436)
at java.lang.ProcessImpl.start(ProcessImpl.java:140)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 9 more
i did some research and most people tell that the solution in the following url is fixing the problem
http://unversioned.blogspot.com/2015/12/jdeveloper-12c-generic-installer-cannot-create-weblogic-domain.html
but the problem is when i open the javashell.py file , i don't find an entry for
_osTypeMap =
it Doesn't Exist in the file
Also , another solution the people said it worked is by adding this line
Djdk.lang.Process.allowAmbiguousCommands=true
but they didn't said where to add it and what is the exact steps !
There is a known issue with JDeveloper, WLS 12.2.1.4 and JDK 8 opened at My Oracle Support : Bug 30670839 : INTEGRATED WLS CANNOT BE CREATED WHEN USING JDK1.8.0_231
There is no patch available for now but you can try the workaround provided in the bug note : Revert back to JDK shipped with JDeveloper
If we see, problem is with the type of command that JDeveloper executes to start the weblogic instance is old and therefore does not work correctly, however below solution is working. It did solve the issue in my machine
We must modify this file:
C:<JDEVELOPER Install Path>\ide\bin\ide.conf
Add the following line:
AddVMOption -Djdk.lang.Process.allowAmbiguousCommands = true
Post modification, save the file.
Restart the Jdeveloper, compile and launch the weblogic server.
My project path: c:\dev_latest
Java-version: JDK7 update 21 (I cannot use any other version due to project limitation)
Build Tools: Ant, Gradle
IDE: IntelliJ 17.3,
OS: Windows 10.
tried but not worked for me links:
1) CreateProcess error=206, The filename or extension is too long when running main() method
2) Createprocess error=206; the filename or extension is too long
3) https://coderwall.com/p/795oma/eclipse-junit-createprocess-error-206-filename-or-extension-is-too-long
4) How to set a long Java classpath in Windows?
I am sick of getting this exception :
Caused by: java.io.IOException: Cannot run program "C:\Java\jdk1.7.0_21\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1257)
A week before my code was running just fine. Now I am stuck.
None of the previous answers on the forum resolved my issue.
My colleagues are on same environment but they are not experiencing the same issue.
Thanks in advance.
Just change the launch configuration to avoid using the default shorten line.
see this image for more info.
This will worked for me.
This is very similar to CreateProcess error=206 The filename or extension is too long, and the issue is related (even though it is a different version of IntelliJ, and what you are doing is different).
The problem exists in the IntelliJ workspace, and so you must manually add dynamic.classpath in order for it to work as you expect -- this is in addition to "shorten classpath" setting in the run configuration.
I would not say this is a duplicate question, but it's 90% the same (as it's the same underlying fault causing the issue).
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 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.