Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a J2EE/Grails app as a windows desktop application

I'd like to do the following but am not sure if it can be done and if so how. Create a Grails application on my local machine and test it. Then somehow package it up along with the Jetty server, and install it on a users desktop. The installer would put an icon in the start menu that would launch the server and load the start page in either the users default browser, or a Java application that would imbed the webpage.

like image 689
Jared Avatar asked Jun 30 '09 13:06

Jared


People also ask

How do I run grails application?

Running a Grails Application Using run-app Go to the application directory. For example, go to the as-install /grails/samples/helloworld directory. Run the grails run-app command. The grails run-app command starts the Enterprise Server in the background and runs the application in one step.

How can I tell what version of grails I have Windows?

Metadata regarding a project in Grails is kept in application. properties . Within this file you will find the version of Grails used for the project under the key app.

Is grails a spring boot?

With Grails 3, Grails is now built upon Spring Boot, enabling a very compelling developer experience that makes both Grails developers and Spring Boot developers feel at home.


1 Answers

If Jetty is not a high priority item you can try the Winstone servlet container. You can create an "executable war file" which either can be deployed on a servlet container or simply start with java -jar your.war.

Winstone integration for Grails are on radar so maybe Grails can produce "executable war" in the future.

The start menu and desktop integration can be quite easily created using an installer creation software (e.g. NSIS).

UPDATE: it seems that there is something work differently (or broken) in winstone from version 0.9.5 (it was the first version which supports Servlet 2.5/JSP 2.1). I tried some older versions and 0.8.1 seems to work fine with my test Grails application.

like image 157
Csaba_H Avatar answered Oct 31 '22 19:10

Csaba_H