简体   繁体   中英

Run my java app (System Tray) when Windows starts

I have searched on the net, but I have not found anything for my case.

I have created an application, that shows only in the SystemTray (icon) when you start. I want to run the jar file or the exe automatically when windows starts.

I would like to do this via code or automatically directly from my app. A menu item (for example) that the user could click on that option, if desired. I searched the internet but have not found anything. Thank you in advance Thank you very much

Only code Java or Bat

我认为您可以将应用程序注册为系统服务,设置starttype自动启动

Follow the below steps for windows 7

1)Click the Start windows button , click All Programs, right-click the Startup folder, and then click Open.
2) Open the location that contains the item you want to create a shortcut to.

3) Right-click the item, and then click Create Shortcut. The new shortcut appears in the same location as the original item.

4) Drag the shortcut into the Startup folder.

The next time you start Windows, the program will run automatically.

I got from this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM