Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc questions

 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've written the class keyword with an uppercase 'C'.
 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic