LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2007, 02:11 PM   #1
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Rep: Reputation: 30
java class loading:


Hello all,

I have a class file in Java that loads databases, at the moment this class file just loads one database, but I want it to load multiple databases but im not sure how to go about it, what would be the best way?

To load multiple instances of the same class or to use the class to open multiple connections to the database? And how would i accomplish this??


i.e.
Code:
DBLoader[] dbLoader = new DBLoader();

However I've tried this and it doesnt work.
 
Old 09-11-2007, 09:10 PM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Code:
DBLoader[] dbLoader = new DBLoader[5];

for(int i=0;i<dbLoader.length;i++){
   dbLoader[i] = new DBLoader();
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Dynamic Class Loading wildcat22 Programming 2 12-29-2005 12:09 PM
dynamic class loading doesn't find my functions!? Thinking Programming 1 07-28-2005 02:12 PM
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 04:57 AM
Compile Java - .class, .java, .jar ? woranl Programming 2 11-09-2004 10:12 PM
Dynamic Class Loading Problems dmnc Programming 11 07-22-2004 04:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration