wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes jdbc questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jdbc questions" Watch "jdbc questions" New topic
Author

jdbc questions

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
hi

i'm trying to compile the following code using a 3rd party driver. by using the following

javac -classpath "C:\beans" webtopjdbc.java

and getting the following error

webtopjdbc.java:4: 'class' or 'interface' expected
public Class webtopjdbc {
^
webtopjdbc.java:1: package basiswebtop does not exist
import basiswebtop.*;
^
webtopjdbc.java:2: package basisjdbc does not exist
import basisjdbc.*;



do i have to use the main method ?

do i have to instantiate the class ?

do i have to use the import statements ?

both jar files are in the directory so why isn't it being read ?

cheers

chris


One day all greenhorns will run free ...
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You've written the class keyword with an uppercase 'C'.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
thanks. it worled when i changed it and the compile line to javac -classpath "C:\beans\ "

its funny though, when i run the command and it returns to the prompt (giving no message as always - inferring its compiled), and yet its not there in the directory ?? vai command line or windows explorer interface ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

This is a basic java compilation issue and not related to JDBC, so I'm moving this off to the Java in General(beginner) forum for further discussion.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc questions
 
Similar Threads
Database URL
JDBC Oracle connection error
NPE
compiled or not compiled
JDBC Error