I'm running the interactive Groovy Shell and it's literally taking minutes to start on my machine (a Windows 7 laptop with an Intel i5 processor and 4 GB of RAM so not an ancient computer, just a middle of the road one)
Running simple scripts using groovy or groovyclient and groovyserver takes an acceptable amount of time (several seconds tops) but after running groovysh the cursor just starts blinking for... long enough for me to make tea, write this very question and rant about this on Twitter (and still no prompt to write any code)
Tried this with the following configurations
- Groovy Version: 2.3.4 JVM: 1.7.0_03 Vendor: Oracle Corporation OS: Windows 7
- Groovy Version: 2.3.4 JVM: 1.8.0_20 Vendor: Oracle Corporation OS: Windows 7
and it's exactly the same.
I'd really like to be able to use it in a REPL style. Has anyone faced and solved similar problems? Can you recommend a different tool for the job?
As suggested in the comments, I ran groovysh -d -v to enable debug and verbose output, in hope of seeing what takes such a long time.
Output of groovysh -d -v
DEBUG [org.codehaus.groovy.tools.shell.BufferManager] Created new buffer with index: 0
DEBUG [org.codehaus.groovy.tools.shell.BufferManager] Buffers reset
DEBUG [org.codehaus.groovy.tools.shell.Parser] Using parser flavor: rigid
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: ?
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :help
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :quit
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :exit
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: import
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :display
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :clear
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :show
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :inspect
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :purge
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :edit
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: .
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :load
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :save
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :record
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :history
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :alias
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :set
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :register
DEBUG [org.codehaus.groovy.tools.shell.CommandRegistry] Registered command: :doc
For a very long time, no further output and then the whole rest in a matter of seconds:
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] Terminal (jline.AnsiWindowsTerminal@66f57048)
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] Supported: true
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] ECHO: (enabled: false)
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] H x W: 41 x 169
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] ANSI: true
DEBUG [org.codehaus.groovy.tools.shell.Groovysh] Direct: true
DEBUG [org.codehaus.groovy.tools.shell.InteractiveShellRunner] Using history file: C:\Users\Tomek\.groovy\groovysh.history
Groovy Shell (2.3.4, JVM: 1.8.0_20)
Type ':help' or ':h' for help.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[1] for command: :help
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[2] for command: ?
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[3] for command: :exit
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[4] for command: :quit
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[5] for command: import
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[6] for command: :display
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[7] for command: :clear
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[8] for command: :show
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[9] for command: :inspect
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[10] for command: :purge
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[11] for command: :edit
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[12] for command: :load
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[13] for command: .
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[14] for command: :save
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[15] for command: :record
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[16] for command: :history
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[17] for command: :alias
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[18] for command: :set
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[19] for command: :register
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Added completer[20] for command: :doc
DEBUG [org.codehaus.groovy.tools.shell.CommandsMultiCompleter] Refreshing the completer list
DEBUG [org.codehaus.groovy.tools.shell.InteractiveShellRunner] Running
groovy:000>
-vdgiving any clues? - cfrickgroovysh -vdresults in the following error:"Unrecognized option: -vd error: jvm creation failed with code -1: unknown error"- toniedzwiedz-d? check the help. maybe its/dor some other windowizm - cfrick-d -vnow, I'll post the output if it's different in any meaningful way. - toniedzwiedz