1

Is there a cross platform way to make my java application auto-start? If there is no cross platform way, is there at least a Windows 7 & Windows 8 technique?

I need to know how this is possible using java code.

Thank you, in advance.

1 Answer 1

1

For windows, create a .bat batch file and put following command

@javaw -jar jar-path-directory arguments

put the batch file in startup directory

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

6 Comments

Where is the startup directory? And the Java-app should make itself autostart on the next system start. So does a usual Java-app have the permission to write to the startup directory? And is there a comparable way on how to do this on apple?
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup if your windows installed in C drive
Thank you. Is it the same for Windows 7? And apple?
i dont use mac so can not confirm you :)
How can I access that folder in java? The actual folder name may vary because it contains the username. And is a Java-application able to write in this location?
|

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.