Is it possible to package a Vaadin app in flash drive?

Hello guys,

I am required to package an application to run a small database in a flash drive. I would love to use Vaadin to make this web based app.
But I have no idea if it is possible to package the full application in a stick so that, a user can execute from there and run everything withough being needed to install other stuff to the machine.

The application will have a small database, and it is customised to run reports and data browsing for this set of data. And it is customer confidential and cannot be deployed online.

I would appreciate any help on this.

Regards.

You can put a lightweight server (Jetty) and all libraries on flash drive; and run it from there.

Hello, thanks for the suggestion, I had thought of that, but I need more on how do I setup so that everything runs from the flash disk, i.e. Ports, and other environment settings for that matter, I have never done anything like this. more help will be appreciated.

Regards.

You actually just download and extract an application server (like Tomcat or probably Jetty as suggested) which doesn’t require an installation. Then, if needed, you can change the port in its settings (probably some xml File). The default should be something like 8080 which should be fine as this port is free most of the times (as it is mostly used by Application Development servers). Then just add your war to it. When the server is then executed it (should) act the same way as if you have the server on the hard drive.
The process is the same as if you “install” a server on your computer’s hard drive.

Setting up the basics are easy:

  1. Package your software into a war
  2. Download tomcat zip from here http://tomcat.apache.org/download-80.cgi. (or older tomcat if you rely on older java)
  3. extract the zip onto the flash drive
  4. copy war into tomcat/webapps
  5. run tomcat/bin/startup.bat or .sh depending on the host OS.

Note that all solutions that I come to think of requires to have Java runtime installed on the computer where it will be run.

Thanks guys, I appreciate your timely and prompt replies, I will work on this, and will give feedback how it works.

Thanks again.

Have a look at spring boot: https://vaadin.com/blog/-/blogs/spring-time-for-vaadin for a convinient way to package a vaadin app as an executable jar (including embedded jetty etc.)

Then launch it with ‘java -jar myApp.jar’