4

I need some way of starting my Java application without forcing the user to run the application manually. I'm not entirely sure how I would do it, can anyone provide any assistance?

6
  • 1
    Assigning it to what? Commented Sep 18, 2013 at 14:06
  • Believe he wants to programmatically assign a program to run on start-up. Commented Sep 18, 2013 at 14:09
  • 1
    @SotiriosDelimanolis I think he means manually assigning it to run at startup. Ending sentences with prepositions. Commented Sep 18, 2013 at 14:09
  • Assigning in the other sense. Should be read "running a java application at startup without manually clicking it to run it or scheduling a task for startup." He wants code to automatically run his program Commented Sep 18, 2013 at 14:09
  • 2
    I don't think there's a platform-independent way to do this, what operating system or systems do you need this for? Commented Sep 18, 2013 at 14:26

2 Answers 2

2

Run it as a Windows Service. It's the way to go.

For various ways to run it as a service, check out the answers to the following questions:

You can also read this article.

Sign up to request clarification or add additional context in comments.

Comments

1

use registry editor to add path of .exe file to startup goto Run from start menu, type regedit.exe

then navigate to HKEY_CURRENT_USER / SOFTWARE / MICROSOFT / WINDOWS / CURRENT_VERSION / RUN

on the right side, create a new string value with

name = "anything" and value = java.exe -jar "complete path of the file"

press ok to save the registry entry, restart your pc to see effect

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.