Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > packing derby derby with java application

Reply
Thread Tools

packing derby derby with java application

 
 
Wills
Guest
Posts: n/a
 
      07-09-2007
Hi all,
I have done a java application that requires DBDerby .How can I
supply DB derby with the java application to a customer.Should I
install DB derby in a particular folder where the software requires it
in my customers machine.This is the first time I am doing such an
application.
Thanks in advance.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-09-2007
Wills wrote:
...
> I have done a java application that requires DBDerby .How can I
>supply DB derby with the java application to a customer.


Java web start is one way.
Demos <http://www.physci.org/jws/>

>..Should I
>install DB derby in a particular folder where the software requires it
>in my customers machine.


I doubt it is necessary, check the documentation.
If not, simply add the Derby API's into the application's
runtime classpath (in the web start launch file).
Otherwise, you might use a JWS installer* to install
the DB, and set the properties that allows the
application to find it.
<http://www.physci.org/jws/#eis>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com

 
Reply With Quote
 
 
 
 
root
Guest
Posts: n/a
 
      07-09-2007
Andrew Thompson wrote:
> Wills wrote:
> ..
>> I have done a java application that requires DBDerby .How can I
>> supply DB derby with the java application to a customer.

>
> Java web start is one way.
> Demos <http://www.physci.org/jws/>
>
>> ..Should I
>> install DB derby in a particular folder where the software requires it
>> in my customers machine.

>
> I doubt it is necessary, check the documentation.
> If not, simply add the Derby API's into the application's
> runtime classpath (in the web start launch file).
> Otherwise, you might use a JWS installer* to install
> the DB, and set the properties that allows the
> application to find it.
> <http://www.physci.org/jws/#eis>
>

I have developed a quite complex software with derby embedded into it &
access to data through ejb3 ( toplink


)RUNOPTS="-Dconfig.filename=project.base.xml -Dconfig.location=file
-Dderby.system.home=/home/java/databases"

java $RUNOPTS tibetsoftware.wenmei.core.Main 2>&1 | tee LOG

you can put the derby database folder anywhere you want it to be
simply need to setup some sort of environment like
you can even start the database within java



serverThread srv=new serverThread();
srv.run();

package tibetsoftware.wenmei.core;

import java.net.UnknownHostException;
import org.apache.derby.drda.NetworkServerControl;

public class serverThread extends Thread {

public void start() {
System.out.println("Starting Server Thread...");
try {
NetworkServerControl server = new

// hostname/port read from derby.properties
NetworkServerControl();

// hostname/port as arguments
//NetworkServerControl(InetAddress.getByName("9.x.x. x"),1527);

server.start(null);
} catch (UnknownHostException e) {
System.out.println("Unkown host error");
e.printStackTrace();
} catch (Exception e) {
System.out.println("Unkown EXCEPTION");
e.printStackTrace();
}
}
public void run() {
start();
}
}

hope that helps
patrick



 
Reply With Quote
 
Wills
Guest
Posts: n/a
 
      07-10-2007
On Jul 9, 4:10 pm, root <(E-Mail Removed)> wrote:
> Andrew Thompson wrote:
> > Wills wrote:


>
> }
>
> hope that helps
> patrick


Hi all,
Thanks for your response.I feel difficult to understand the code.I am
still going through Derby documentation.
Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot make a Java project Derby enabled - Please help. ajithkumarsl Java 0 09-11-2009 03:36 PM
Re: Java persistence, Derby, and Unique Constraints Arved Sandstrom Java 1 08-17-2008 08:45 PM
packing derby derby with java application Wills Java 0 07-09-2007 10:25 AM
netbeans rc2 derby driver error rySource Java 0 01-21-2006 01:05 AM
Compare Java DBMS - Cloudscap/Derby, hSQLDB, others Chris Java 3 07-07-2005 04:21 AM



Advertisments