I have created a jar. It of coarse work fine. I want that jar to run at start-up automatically. How can I do so??
Asked
Active
Viewed 147 times
0
-
1Start-up of what? Computer, OS, server, phone... – AlexR May 18 '14 at 13:11
-
In windows computer, place a jar in startup folder – Tamil Selvan C May 18 '14 at 13:12
-
@TamilSelvan where is that startup folder? – sedflix May 18 '14 at 13:13
1 Answers
1
You can write a .bat file to accomplish this.
@javaw -jar path/to/jar/your.jar arguments
(if your jar is an command prompt app, use @java
)
and then put this .bat file in startup directory.
where is startup directory:
In windows, you can click the Start button Picture of the Start button , click All Programs, right-click the Startup folder, and then click Open.

Owen Cao
- 7,955
- 2
- 27
- 35
-
`@javaw -jar path/to/jar/your.jar arguments` what do this mean.. I know nothing about bat file.. I can just create them.... If the address of jar is 'x' then what I have to write – sedflix May 18 '14 at 14:29
-
A cmd window opens and closes instantly at startup but it the jar doesnt get executed...this was what I wrote ***@javaw -jar C:\Users\Siddharth Yadav\Desktop\Tic-Tac-Toe.jar*** – sedflix May 18 '14 at 15:52
-
-
-
There should no blank in the path, so `Siddharth Yadav` is wrong, use a path without blank, and use `@javaw` since your app has GUI – Owen Cao May 18 '14 at 15:59
-
-
-