0

I am about to embark on a project to create a platform-independent local server for coordinating file editing. The server is local to any given machine but will be used by many people on many different machines. My first instinct was to use Java since it is very portable, supports web development, and it has good libraries available for both json and mongodb (the core requirements for this project).

Portability is key. I imagined the user simply firing up the .jar, and they have their local server running.

After doing some research into Java web development, however, I see that you need some server environment like tomcat, app engine, or jetty. I can't require every user to install one of these environments (that defeats the simplicity of portable java executables).

question: Is what I described possible in Java or do I need to start looking elsewhere?

wrongu
  • 560
  • 3
  • 13
  • 1
    You'll have to install your software in the user's machine, why is it a problem that you have to bundle needed libraries / other code with your software? – vanza Oct 23 '13 at 03:59
  • If the server environment can be bundled with it, that would work just fine! I hadn't phrased it that way in any searches. This looks like it will be a good resouce: http://stackoverflow.com/questions/856772/create-installer – wrongu Oct 23 '13 at 13:22

1 Answers1

1

Sure you can create a web server that runs inside your desktop app - this is usually called an embedded server. You can also package all needed libraries inside your application package (.jar).

http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty

Howto embed Tomcat 6?

You can even package your java jar into a native app installer, to make experience smooth for the layman.

Community
  • 1
  • 1
Peter Knego
  • 79,991
  • 11
  • 123
  • 154