Results 1 to 6 of 6
- 05-10-2010, 04:23 PM #1
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
Oracle Connect thru register driver
I have been using the Oracle .jar files to connect the IDE (Netbeans and Eclipse). Using the jar files did help me through many personal projects I have accomplished. But I was wondering.
1.) Is there an alternative way to connect the Oracle DB without the use of the .jar files. What I am to avoid is the lib folder created during building the project.
2.) If there was a way, what could be the advantages and disadvantages between using the .jar files than the alternative way.
3.) And in any way, which will you prefer most in particular, deployment, performance, and errorless issues.
Thanks.Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 05-10-2010, 05:15 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Why avoid the lib directory?
Almost every bit of Java worth anything is built on libraries of code, and consequently has dependencies...why try and avoid them?
I've heard of people unzipping the jars and rebuilding them into a single app jar, but that strikes me as slightly absurd. And I wouldn't like to guarantee the licensing legalities of it with, say, Oracles driver.
So, considering most software is packaged for deployment with a lib directory, especially web apps, then I would suggest not sticking with jars.
- 05-11-2010, 10:25 AM #3
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
I am avoiding the lib directory under the build directory for a single purpose.
I wanted my build file to be the only file to be deployed without including anymore the lib folder (directory).
If you may, Tolls, what are those dependecies you speak of.
I understood your concern more clearly.Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 05-11-2010, 10:31 AM #4
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
In addition,
I have researched about this code,
What is the difference between using this code than adding the two .jar files for Oracle Thin Driver?Java Code:DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 05-11-2010, 11:06 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
What are dependencies?
Seriously?
OK, you are dependent on the Java libraries supplied by Sun (or one of the other ones, say OpenJDK or IBM)...those do not need to be supplied by you. You are also dependent on any other code you use...stuff from Apache, Spring, Struts, or any number of other third party libraries. And, in your case, the Driver from Oracle.
In Windows you have DLLs, in Linux you have link libraries...in Java you have jars.
So, you supply the jars (libraries) you are dependent on when you hand over your app. Look at Eclipse, or Netbeans, or any number of other apps and see what they provide in order to run.
As for registerDriver, that still requires you to have the jar file on the runtime classpath.
- 05-11-2010, 03:45 PM #6
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
Similar Threads
-
Oracle Driver
By Shadi-Palestine in forum JDBCReplies: 4Last Post: 06-23-2010, 12:51 AM -
Oracle connection and register
By digioleg in forum New To JavaReplies: 1Last Post: 08-19-2009, 07:43 PM -
can't register a MySQL driver
By prfalco in forum New To JavaReplies: 4Last Post: 02-03-2008, 11:13 PM -
Oracle Driver
By softy in forum JDBCReplies: 1Last Post: 07-02-2007, 12:20 AM -
Oracle Driver
By softy in forum Advanced JavaReplies: 0Last Post: 06-28-2007, 02:23 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks