Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 797725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:51:15+00:00 2026-05-14T22:51:15+00:00

I’m working on a application manager for embeded platform based on the CVM PhoneME

  • 0

I’m working on a application manager for embeded platform based on the CVM PhoneME VM. The VM is started by a C++ app which configures the CVM and then triggers the VM itself. This C++ app is called form the command line passing the main class name and the classpath of a java application. There is a main java app (lets call it Manager) which loads the app using classloaders. I want this manager to be a single instance application so it could track all running apps.

In other words: The first time I start an app (app1 for instance), the VM will launch and the Manager will load the app1. In further calls to load other apps (app2, app3 and so on), the same instance of the Manager would load those apps.

The manager is working fine, except for the fact that this is not a single instance.

Is it possible to do what I want?

I found this:
http://www.knowledgesutra.com/forums/topic/59760-how-to-implement-single-instance-application-on-java/

This is almost the same I want, except for the app loading part. However, the necessary packages are not available in the CVM implementation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:51:16+00:00Added an answer on May 14, 2026 at 10:51 pm

    There are various ways to enforce a single instance of an application. Firefox uses a lock file, for example.

    One of the most common ways I’ve seen is to launch the “manager” regardless, but at launch, try to open a ServerSocket on some port listening for connections.

    If you fail to open the socket, you know you’re not the singleton instance. So, instead of launching the app, connect to the listening socket and send it the program arguments instead.

    If you succeed in opening the socket, do what was asked to launch app1 while on another thread listen for incoming connections from those managers launched as duplicate instances.

    Edit: This describes the process in a non-ME environment. Not being an ME developer, I can’t comment on its feasibility on a phone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 416k
  • Answers 416k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It depends on how you handle the linking of external… May 15, 2026 at 9:30 am
  • Editorial Team
    Editorial Team added an answer To use AJAX returns on models and views, you need… May 15, 2026 at 9:30 am
  • Editorial Team
    Editorial Team added an answer You can end up with invalid XML, but you will… May 15, 2026 at 9:30 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.