Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starting Oracle services through java

 
amol l a lekurwale
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to use java.lang.Runtime in this case?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the command line it would be :

Just call that from a ProcessBuilder or using Runtime.exec().
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can use following code to connect oracle from jsp[java]....

 
amol l a lekurwale
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all for their valuable response.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic