InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: CreateDatabase( 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.