🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #291

Re: I need something like app.path or project.path (which is not user.dir)

#291
From: Paul Nichols (TeamB)
Date: Sun, 12 Feb 2006 06:25
28 lines
2113 bytes
Brunet Djura wrote:

> I'm working on a database application in Borland JBuilder 2006 on Linux
> Fedora Core 4 platform. I choose JDataStore as database, and
> JasperReports for reporting part.
> 
> My connection code looks like this >
> 
> String app_path = "/home/brunetdj/my/source/jbuilder/info2006/";
> String db_path = app_path + "data/podaci.jds";
> 
> database.setConnection(new ConnectionDescriptor("jdbc:borland:dslocal:"
>    + db_path,"SYSDBA", "masterkey", false,
> "com.borland.datastore.jdbc.DataStoreDriver"));
> 
I would follow John's suggestion fiurst. An alternative is to make sure that
your paths are not linux/mac/unix specific.

For instance something like /data/pdaci.jsd would work on Windows and Unix,
provided you created a /data (Unix and Mac) or C:\data (Windows)directory
and put the podaci.jds file in that new directory.

Another option is to put the database in the classpath directory of your
database connection class. Then

Url url=this.getClass().getResource("podaci.jds");
  
 
Technical Details
Message-ID: <43f0232e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43ef57fa$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,312d83137a5895b1
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII-7-bit
Message-ID: <43f0232e@newsgroups.borland.com>
From: "Paul Nichols (TeamB)" <paul@comp.net>
Subject: Re: I need something like app.path or project.path (which is not user.dir)
Newsgroups: borland.public.jbuilder.database
Reply-To: paul@comp.net
Date: Sun, 12 Feb 2006 01:25:17 -0500
References: <43ef57fa$1@newsgroups.borland.com>
Lines: 28
Organization: Team B
User-Agent: KNode/0.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 70.34.189.24
X-Trace: newsgroups.borland.com 1139811118 70.34.189.24 (12 Feb 2006 22:11:58 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail