Java – stop and start JBoss programmatically in eclipse

Can JBoss be started and stopped programmatically in eclipse? I am using indigo eclipse Java EE, and I have a JBoss 5.1 0. GA server, I start / stop it manually in eclipse

I want to restart the server automatically (as part of the testing process to restart the server to reflect the changes in the database) Are there any libraries I can use to do this, or other ways to do this?

Solution

Created using a script that executes close (bat or SH) and then runs (bat or SH) Bat or SH file (depending on the operating system on which the JBoss instance is installed) There is no need to use Java or any other programming language

However, if you really want to do this in Java, you can use one of these methods (again, depending on the operating system):

Batch file:

> How do I run a batch file from my Java Application?

Shell file:

> Java – Execute a . SH file > Running . sh files with Java’s exec in a different directory?

Note that the run and stop script files are located in [jboss_install_path] / bin

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>