[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Start server from Java code

Posted on 2011-10-12
3
Medium Priority
?
232 Views
Last Modified: 2012-05-12
I want to start my rabbitmq server from java code.

This is what I do from the command line:
C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.5.1\sbin\rabbitmq-service.bat" start

If possible, please provide some sample code. Thanks!
0
Comment
Question by:dshrenik
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 36957906
0
 

Author Comment

by:dshrenik
ID: 36957918
Do I create a .bat to execute the command?
If yes, can you tell me how? Thanks!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 36958850
Well you can use a .bat, yes ( i thought you were already). Try
Process p = Runtime.getRuntime().exec(new String[] { "cmd.exe", "/c", "start", "C:\\Program Files (x86)\\RabbitMQ Server\\rabbitmq_server-2.5.1\\sbin\\rabbitmq-service.bat", "start" });

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question