-1

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

2 Answers2

2

I think you can register your application as a system service, set the starttype auto start

elevenights
  • 128
  • 1
  • 10
  • yes i want to set my app to the windows start, but with the code Java. I read that you can do by transferring the jar file in some folder, possible? @dlbtar – Lorenzo Sogliani Aug 19 '14 at 17:14
  • @LorenzoSogliani what I do was release. exe file and register as system service. that is to start your application in C program. must have start and stop function for system call – elevenights Aug 19 '14 at 17:36
  • can you explain an example? ty – Lorenzo Sogliani Aug 19 '14 at 18:06
  • in VS project, select Files->New->Project->Windows->Windows Service, then write code in OnStart(string[] args) and OnStop() function.The complexity lies in the start JVM in C language.Recommend that you use the [Java Service Wrapper](http://wrapper.tanukisoftware.com/), It's convenient to register java application as system service in common OS. – elevenights Aug 20 '14 at 08:57
  • in Visual Studio and with language c#? – Lorenzo Sogliani Aug 20 '14 at 09:32
  • yes. i think Java Service Wrapper may be more convenient, just need to configure parameter. – elevenights Aug 20 '14 at 10:56
1

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

prashant thakre
  • 5,061
  • 3
  • 26
  • 39