开发者

auto start Java program

开发者 https://www.devze.com 2023-01-27 19:34 出处:网络
I want to makeauto star开发者_如何学编程t Java program in such a way that its start up whenever client machine is booted.This depends on the OS where you want to start your application.

I want to make auto star开发者_如何学编程t Java program in such a way that its start up whenever client machine is booted.


This depends on the OS where you want to start your application.

For example if it's Windows you can make a .bat file containing command you can use to start you application from console, something like that:

java MainClassName

Depending on you application you may need to add parameters.

Further you can go to Autostart folder in Start Menu and create there shortcut to your .bat file. You should also specify the correct working folder in shortcut properties.


The answer depends on what OS you are using. Running program every time system starts is an OS job. Not Java. If you are using unix/linux, then, generally, you need to set up command line script using bash (or equivalent) as a wrapper to your program. On Windows... Just use the msconfig.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号