Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Distributing a java application

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have a very basic question.
I have a java application that currently starts via a main program. I want to distribute it to clients so that the application runs on all platforms continuously in the background.
I saw java service wrapper, but I couldn't figure out how to make a distributable file out of it.
I guess java web start would be another solution, but then again how do I make my application run in the background non stop (if it stops then I'd like the OS to restart it....much like a service).
Spent a whole day googling for the answer, but can't find a viable solution.

Thanks
Prnbs
 
Marshal
Posts: 26750
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by a "distributable program"? Everything is distributable, you don't have to do anything special.
 
Marshal
Posts: 73738
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Is thisof any help?
 
Pranabesh Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Paul Clapman -- My mistake. I meant that I want to pack my code maybe as an exe for windows or dmg for mac (I have already tried the obvious executable jar)

@Campbell Ritchie -- Thanks for the link. I have been looking at Java web start, but for my code to really work well, I'd like my code to run as a windows service and whatever the equivalent of that in other OS are. But as far as I have understood applications based on Java web start need some kind of user intervention to start (if say the pc was shutdown)
 
Marshal
Posts: 22396
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use the Java Service Wrapper for that. Still, I think you'll need an installer for each platform, since installing services is not the same for all platforms. For instance, in Windows you need to register the service ("sc create <service name> <full path to the executable> start=auto DisplayName=" can be used, or you can use Windows API calls), while in Linux you need to create a starter file called S<2 digit number><name> in /etc/rc.d (I think it was this folder).
 
"To do good, you actually have to do something." -- Yvon Chouinard
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic