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

  • SEARCH
  • Home
  • 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 8760065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:57:17+00:00 2026-06-13T14:57:17+00:00

I wrote a program in Java that makes it easy to setup and switch

  • 0

I wrote a program in Java that makes it easy to setup and switch between different versions of Minecraft. The program is pretty much done, but I’m faced with a problem that I can’t seen to find the solution for. I have a button in the program that allows you to launch Minecraft by means of the Runtime object. This works well on my computer because I know where I have my .app or .exe file (depending on OS). I don’t however know where that file is located on anyone else’s computer. I have thought of a few ways of getting around this, but none seem to be feasible.

One idea was to just prompt the user to locate the file through a file chooser and then cache that file. This would work, but isn’t very elegant, especially for users that aren’t very computer literate.

I also thought about bundling the .app and .exe file with my application but that brought up even more problems. For one, I don’t know if it’s exactly legal for me to be distributing that file with my application. Also, it would change the way I would have to distribute my application to include some sort of installer that sets up everything.

Does anyone have any better ideas on how to handle this problem?

  • 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-06-13T14:57:19+00:00Added an answer on June 13, 2026 at 2:57 pm

    You have at least three choices that I can think

    1. You can use a configuration system to store the location(s) of the program and prompt the user/supply a config API to set the value. This is good and rather simple to do
    2. You can search commonly well know locations for the location and if it’s not found, prompt the user (and hopefully store the result). This is okay, but it relies on a number of factors, including the OS and the program actually being loaded in a “common” location and being named in a “common” manner.
    3. Search the hard drive. This is poor as it’s time consuming and the application might not actually exist on the drive you are search…Searching all available locations could lead you onto network drives which will just be slower…And prompt the user if it’s not found

    Seen as almost all the solutions fail to “prompt the user” I would probably use a combination of 1 & 2. Allow the user to specify the location, if they don’t, search some common known locations and if you still can’t find it, prompt the user (and hopefully save the value for reuse).

    IMHO

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

Sidebar

Related Questions

I wrote a program in java that rolls a die and records the total
I'm writting a program in Java that makes requests to an external API by
I'm trying to write a program in Java that uses osql to generate a
I'm trying to write a program in Java that looks for patterns of strings
I want to write a program (preferably in java) that will parse and analyze
I have to write a Java program that tells what coins to give out
I want to write a java program that acts as a user interface to
I am trying at write a java program that hits a url over ssl,
I am trying to write a Java program that reads an input file consisting
I'm trying to follow Java's JDBC tutorials to write a Java program that can

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.