== General

=== What is CRaSH ?

CRaSH is a shell that extends JVM. With CRaSH, you will connect with a shell directly on a JVM.
Moreover, you could add your command (Java/Groovy) and that's why CRaSH is really interesting.

=== What can I do with CRaSH ?

* Monitoring JVM and make your own dashboard command.
* Make command for your application (add data in a cache, add user, monitor jobs ).
* Make your JMX command.

=== What are the differences between CRaSH and JMX ?

JMX provides only bean and methods, that's all. CRaSH permit to access to JMX and to make command with it.
CRaSH also permit to make script with thread, jdbc, entity ...

== Running CRaSH

=== How can I run CRaSH ?

Refer to documentation in the <<reference#running_crash,Running Crash>> chapter.

=== How can I connect Crash to a JVM ?

Refer to documentation in the <<reference#connection,Connection>> section of the Shell Usage chapter.

== Basic

=== What is the best way to create a command ?

The best way to create a command is to use CRaSH utilities.
Refer to documentation in the <<reference#developping_commands>> section of the Developers chapter.

=== What is the best way to start with CRaSH ?

* Launch CRaSH and play with commands
* Create commands (script command and class command)
* See cookbook and documentation.

== Commons problems

=== Command not found

In most cases, when you created a command, it's a syntax error in a command.
Check your import and syntax with your ide.

=== Can't find crash.properties file

You have to launch CRaSH in standalone mode once.
Then, it will appears in +$CRASH_HOME/conf/+

=== Where are the base commands ?

They will be in +$CRASH_HOME/cmd/base+ directory. You have to launch CRaSH once in standalone mode.

=== I try to run CRaSH in Eclipse and it terminates immediately

CRaSH uses jline to handle keyboard input, and it's bypassing the Java API to read the key events.
Somewhere in the process there is a mismatch with the input handling in the Console view of Eclipse, and
CRaSH terminates without any reported error. You have to force jline to use a pure Java
handling of the keyboard events by adding the following JVM parameter in the Launch Configuration:

----
-Djline.terminal=jline.UnsupportedTerminal
----

You will notice that the caret is not positioned correctly after submitting a command.