-2

How to create Grails project through windows command prompt? In Grails Documents it says to use Posh-GVM.But i want to know how to use Posh_GVM.

rijas pk
  • 1
  • 1
  • 6

2 Answers2

0

Make sure the JDK is properly installed and JAVA_HOME environment variable is defined. To make sure your JDK is installed, you can open a command prompt and enter

java -version

Make sure appropriate Grails files as downloaded and GRAILS_HOME environment variable is defined. To make sure Grails is installed, you can open a command prompt and enter

 grails -version

Once you have successfully installed JDK and Grails, go to the folder where you want to create your Grails app and type

 grails
 create-app com.example.yourappname
elixir
  • 1,394
  • 1
  • 11
  • 21
0

I have consider that you have set JAVA_HOME && GRAILS HOME

Then check for JAVA_HOME && GRAILS_HOME

Type this into your command prompt :

JAVA -version 

then check for

GRAILS_HOME

If both are shown their version else you reset your ENVIRONMENT variable again.

If you want create grails app through command prompt :

Go to cmd prompt :

create directory using following command:

mkdir grails_app

Then go to grails_app directory following command:

cd grails_app

Then,

Type following command to create the grails application in using command prompt:

grails create-app helloworld

Here,

helloworld - Name of grails application

For more details you can use following document :

http://docs.grails.org/2.4.4/guide/gettingStarted.html#creatingAnApplication

Hope this will help you create grails app through command prompt

Community
  • 1
  • 1
Dipak Thoke
  • 1,963
  • 11
  • 18
  • as a wrote the create command error " C:\Users\se399>cd grails-app C:\Users\se399\grails-app>grails create-app helloworld 'grails' is not recognized as an internal or external command, operable program or batch file. C:\Users\se399\grails-app>" occured – rijas pk May 18 '17 at 06:42
  • It means you have not set grails home – Dipak Thoke May 18 '17 at 06:43
  • please set grails enivoroment variable first then try it will work – Dipak Thoke May 18 '17 at 06:47
  • http://www.evoketechnologies.com/blog/setup-grails-framework-windows/ use this link set grails ENV varraible. – Dipak Thoke May 18 '17 at 06:50
  • @rijaspk can you just up vote ans(+1) my answer so that others can refer this answer – Dipak Thoke May 18 '17 at 17:39