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 6339489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:39:31+00:00 2026-05-24T19:39:31+00:00

I have the following methods at my disposal: A method to get the running

  • 0

I have the following methods at my disposal:

  • A method to get the running JAR file’s path. (The path of the file to copy).
  • A method to get the current operating system. (Mac, Windows, Linux, or Unknown).

How would I go about writing a method to copy the JAR file to the startup directory based on the type of computer?

  • 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-24T19:39:31+00:00Added an answer on May 24, 2026 at 7:39 pm

    The concept of a “startup directory” that you can drop executables into to run at startup time does not make sense for Linux / UNIX.

    In a typical Linux system, tasks performed on system startup are controlled by the init process based on shell scripts that are typically installed in /etc/init.d. The chkconfig program manages a bunch of links in “run level” directories that tell init what to run for each system run level.

    The init.d scripts are not just any old script.

    • They have to obey a specific “protocol”; i.e. support certain comman options.
    • They typically have special comments that tell the chkconfig program when the script should be run; i.e. at what run levels, and in what order.

    I believe that modern UNIX systems work roughly the same way, though I known that some older versions did this differently.

    Update in 20012: It gets worse. Recent Linux distros are replacing init.d scripts with upstart scripts. Sigh.


    The above deals with system startup. There is no general concept of a “startup directory” for users either.

    I guess, a window manager could implement a “startup directory”, but a typical Linux user is free to choose and configure the window manager, or use no window manager at all.

    The normal way to configure things to happen when the user logs in is via shell initialization scripts; e.g. ~/.bashrc, ~/.bash_login and so on. It is a BAD IDEA for an installer to modify those files because it would be next to impossible to get it right in all circumstances … given the weird and wonderful things it is possible to do in a shell initialization script.


    The bottom line though is that if you are writing installers to install your software for a number of platforms, you have to understand those platforms. You need hands on experience using them and (to some level) administering them, and specific knowledge of the “right way” to do software installation. Clearly you don’t have that knowledge yet for Linux / UNIX.

    Writing installers without adequate knowledge and adequate testing is really, really dangerous. An installer has to be run at a privilege level that means that it can do serious damage to the target system if something goes wrong.

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

Sidebar

Related Questions

I have the following simple methods for writing a python object to a file
I have an .aspx file that outputs an image using the following methods: Server.MapPath(somefile.png)
I have the following methods. The method rnd, returns a single random integer between
i have the following methods: public int CountProperty1 { get { int count =
I have the following two methods that get data from my DB and return
I have the following methods: public <T> T fromJson( Reader jsonData, Class<T> clazz )
I have the following methods in my simple Custom Parser Class, when I execute
I have the following methods in an enum helper class (I have simplified it
I have the following methods on the server (RIA services): public IQueryable<Customer> GetCustomers() {
I’m after some C# code that will have the following methods that will return

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.