aspose file tools*
The moose likes JDBC and the fly likes Starting Oracle services through java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Starting Oracle services through java" Watch "Starting Oracle services through java" New topic
Author

Starting Oracle services through java

amol l a lekurwale
Ranch Hand

Joined: Oct 16, 2008
Posts: 30
To start oracle services, we need to manually start them through services.msc in windows. Can anyone suggest a way to start them through the application before opting for the normal jdbcdbc connection.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1124

Amol,
If there is a Microsoft C++ API for starting services, I suggest using JNI or alternatively the "java.lang.Runtime" class.

Good Luck,
Avi.
amol l a lekurwale
Ranch Hand

Joined: Oct 16, 2008
Posts: 30
How to use java.lang.Runtime in this case?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

From the command line it would be :

Just call that from a ProcessBuilder or using Runtime.exec().


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1124

Amol,
You asked:

How to use java.lang.Runtime

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Good Luck,
Avi.
mehul thakor
Greenhorn

Joined: Oct 23, 2008
Posts: 5
u can use following code to connect oracle from jsp[java]....

amol l a lekurwale
Ranch Hand

Joined: Oct 16, 2008
Posts: 30
Thanks to all for their valuable response.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1124

Mehul,
In case you are unaware, "oracle.jdbc.driver" package has been deprecated for almost two and a half years now:

http://forums.oracle.com/forums/ann.jspa?annID=201

Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Starting Oracle services through java