Thanks, I thought I would try that last night and it worked.
What is the prp file used for anyways?
----- Original Message -----
From: <martin.husted@notes.electrolux.dk>
To: <instantDB@enhydra.org>
Sent: Thursday, July 20, 2000 12:10 AM
Subject: Re: InstantDB: New to instant DB, Help please?
> Note that your SupportCentral.prp is a file like the "sample.prp" included
in
> the "Example" dir of idb.
> Try dropping the "sample.prp" file in the same path where you start your
test
> program, this should get you
> started.
>
>
> Regards,
> Martin
>
>
>
>
>
> "Eric Advincula" <eric07@earthlink.net> on 19-07-2000 22:46:18
>
> Please respond to instantDB@enhydra.org
>
> To: instantDB@enhydra.org
> cc:
> Subject: Re: InstantDB: New to instant DB, Help please?
>
>
>
> Now that i changed the import and removed the package it compiles fine.
But
> when i run the program i get the following error:
>
> java.sql.Exception: FileNotFoundException reading properties from file:
> SupportCentral.prp
> java.io.FileNotFoundException:
> c:\projects\Support_Central\database\SupportCentral.prp ( The system
cannot
> find the file specified )
>
> Now i understand it can't find the file b/c the database does not exist
yet.
> All I'm trying to accomplish is to build the database. I know that I'm
not
> adding any tables in here and I'll get to it as soon as I figure out this
> step. I though that InstantDB creates the database if it cannot find it
or
> does not exist.
>
>
> Here is my new set of code:
>
> import org.enhydra.instantdb.jdbc.*;
> import java.sql.*;
>
> public class CreateDatabase
> {
>
> public static CreateDatabase objCreateDatabase;
>
> public CreateDatabase()
> {
> Connection conn;
> try
> {
>
> Class.forName( "org.enhydra.instantdb.jdbc.idbDriver" );
> conn = DriverManager.getConnection( "jdbc:idb:SupportCentral.prp" );
>
> conn.close();
>
> }
> catch( Exception err )
> {
> // Print out the error message
> System.out.println(err);
> err.printStackTrace();
> }
> }
>
>
> public static void main(String arg[])
> {
> objCreateDatabase = new CreateDatabase();
> System.exit( 0 );
> }
>
> };
>
> Any help please
> ----- Original Message -----
> From: <martin.husted@notes.electrolux.dk>
> To: <instantDB@enhydra.org>
> Sent: Tuesday, July 18, 2000 12:25 AM
> Subject: Re: InstantDB: New to instant DB, Help please?
>
>
> > Hey Eric,
> >
> > Don't use the "package org.enhydra.instantdb;", just make your own
> package, you
> > get the error message
> > becoz of the import line:"import org.enhydra.instantdb.*;" use this
> instead :"
> > import org.enhydra.instantdb.jdbc.*;".
> >
> > This should make your example work.
> >
> >
> >
> >
> >
> > Regards
> >
> > Martin
> >
> >
> >
> >
> >
> >
> >
> >
> > Eric Advincula <eric07@earthlink.net> on 18-07-2000 03:57:32
> >
> > Please respond to instantDB@enhydra.org
> >
> > To: instantDB@enhydra.org
> > cc:
> > Subject: InstantDB: New to instant DB, Help please?
> >
> >
> >
> > I'm new to InstantDb and I'm just trying to build the database without
any
> of
> > the tables.
> >
> > I have jdk1.3 and the latest InstantDB
> > running on Win 2000.
> >
> > My paths:
> > c:\java\jar
> > - has all the idb.jar files
> >
> > Here is my code:
> >
> > package org.enhydra.instantdb;
> >
> > import org.enhydra.instantdb.*;
> > import java.sql.*;
> >
> > public class CreateDatabase
> > {
> >
> > public static CreateDatabase objCreateDatabase;
> >
> > public CreateDatabase()
> > {
> > Connection conn;
> > try
> > {
> >
> > Class.forName( "org.enhydra.instantdb.jdbc.idbDriver" );
> > conn = DriverManager.getConnection(
> > "jdbc:idb:SupportCentralCalendar.prp" );
> >
> > conn.close();
> >
> > }
> > catch( Exception err )
> > {
> > // Print out the error message
> > System.out.println(err);
> > err.printStackTrace();
> > }
> > }
> >
> >
> > public static void main(String arg[])
> > {
> > objCreateDatabase = new CreateDatabase();
> > System.exit( 0 );
> > }
> >
> > };
> >
> >
> > To compile I have a batch file like so:
> >
> > javac -classpath
> > "c:\java\jar;c:\java\jar\idb.jar;c:\projects\support_central\database"
> *.java
> >
> > to run it i have a batch file:
> >
> > java -classpath
> > "c:\java\jar;c:\java\jar\idb.jar;c:\projects\support_central\database"
> > CreateDatabase
> >
> > It compiles fine without any errors or warnings but when I run it I get
> the
> > following errors:
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> reateDatabase( wrong
> > name: org/enhydra/instantdb/CreateDatabase )
> > at java.lang.ClassLoader.defineClass0(Native Method)
> > at java.lang.ClassLoader.defineClass(Unknow Source)
> > ..
> > ...
> >
> > Any ideas? This is my first attempt with Instant DB and although there
> are
> > samples I'm not sure what I'm doing wrong herre.
> >
> > Also, Do I really need "package org.enhydra.instantdb;"
> > on top? Expecially if I'm not creating a package. If I leave it out
> gives me
> > an error that "package org.enydra.instantdb" does not exist.
> > What happens if i'm adding this class as a package for another project
> does that
> > create a conflict?
> >
> > Thanks for any information.
> >
> >
> >
>
> --------------------------------------------------------------------------
> ---
> > To unsubscribe from this mailing list, send email to
majordomo@enhydra.org
> > with the text "unsubscribe instantdb" in the body of the email.
> > If you have other questions regarding this mailing list, send email to
> > the list admin at owner-instantdb@enhydra.org.
> >
> >
> >
> >
> >
> >
>
> --------------------------------------------------------------------------
> ---
> > To unsubscribe from this mailing list, send email to
majordomo@enhydra.org
> > with the text "unsubscribe instantdb" in the body of the email.
> > If you have other questions regarding this mailing list, send email to
> > the list admin at owner-instantdb@enhydra.org.
> >
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
>
>
>
>
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|