I created a jar file for my server. When I try
to execute it in a RANDOM directory, i.e.
C:\, I get the error. Class RegFBNSDatabase starts
the rmiregistry and it's in the jar file.
C:\> dir *.jar
Volume in drive C has no label.
Volume Serial Number is 8C4C-8D25
Directory of C:\
04/07/2003 07:34a 44,647 runserver.jar
1 File(s) 44,647 bytes
0 Dir(s) 71,041,052,672 bytes free
C:\>jar -tvf runserver.jar
0 Mon Apr 07 07:34:24 CDT 2003 META-INF/
114 Mon Apr 07 07:34:24 CDT 2003 META-INF/MANIFEST.MF
0 Mon Apr 07 06:10:36 CDT 2003 suncertify/db/
574 Fri Apr 04 23:41:06 CST 2003 suncertify/db/BookFlightWindow$1.class
4114 Fri Apr 04 23:41:06 CST 2003 suncertify/db/BookFlightWindow$BookEvent.cla
ss
2825 Fri Apr 04 23:41:06 CST 2003 suncertify/db/BookFlightWindow$TextFieldHand
ler.class
6985 Fri Apr 04 23:41:06 CST 2003 suncertify/db/BookFlightWindow.class
1000 Fri Apr 04 11:23:14 CST 2003 suncertify/db/ClientApp.class
608 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientID.class
545 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow$1.class
1506 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow$BookFlightEvent.c
lass
1350 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow$FlightDetailEvent
.class
591 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow$HelpEvent.class
2288 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow$SearchEvent.class
7341 Fri Apr 04 23:41:08 CST 2003 suncertify/db/ClientWindow.class
1358 Fri Apr 04 10:34:46 CST 2003 suncertify/db/CreateReservationDb.class
8499 Fri Apr 04 23:41:10 CST 2003 suncertify/db/Data.class
307 Fri Apr 04 23:41:10 CST 2003 suncertify/db/DatabaseException.class
1016 Fri Apr 04 23:41:10 CST 2003 suncertify/db/DataClient.class
1488 Fri Apr 04 23:41:12 CST 2003 suncertify/db/DataInfo.class
949 Fri Apr 04 23:41:12 CST 2003 suncertify/db/FBNSConnection.class
172 Fri Apr 04 23:41:12 CST 2003 suncertify/db/FBNSDbIntrf.class
2069 Fri Apr 04 23:41:14 CST 2003 suncertify/db/FBNSDbLocal.class
2623 Fri Apr 04 23:41:14 CST 2003 suncertify/db/FBNSDbRemote.class
5472 Fri Apr 04 23:41:48 CST 2003 suncertify/db/FBNSDbRemote_Skel.class
10082 Fri Apr 04 23:41:48 CST 2003 suncertify/db/FBNSDbRemote_Stub.class
564 Fri Apr 04 23:41:14 CST 2003 suncertify/db/FBNSHelpWindow$1.class
2229 Fri Apr 04 23:41:14 CST 2003 suncertify/db/FBNSHelpWindow.class
541 Fri Apr 04 23:41:16 CST 2003 suncertify/db/FieldInfo.class
1021 Fri Apr 04 23:41:16 CST 2003 suncertify/db/FieldSearch.class
584 Fri Apr 04 23:41:16 CST 2003 suncertify/db/FlightDetailWindow$1.class
4546 Fri Apr 04 23:41:16 CST 2003 suncertify/db/FlightDetailWindow.class
1412 Fri Apr 04 23:41:18 CST 2003 suncertify/db/LockTable.class
1978 Mon Apr 07 05:12:08 CDT 2003 suncertify/db/RegFBNSDatabase.class
1743 Fri Apr 04 23:41:18 CST 2003 suncertify/db/TableDataModel.class
C:\>
java -jar runserver.jar
Exception in
thread "main" java.lang.NoClassDefFoundError: suncertify/db/RegFBNS
Database (wrong name: RegFBNSDatabase)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
C:\project>dir *.txt
Volume in drive C has no label.
Volume Serial Number is 8C4C-8D25
Directory of C:\project
04/07/2003 07:33a 47 serverManifest.txt
04/07/2003 05:59a 148 versionInfo.txt
2 File(s) 195 bytes
0 Dir(s) 71,041,052,672 bytes free
C:\project>type serverManifest.txt
Main-Class: suncertify.db.RegFBNSDatabase
Thanks