• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jdbc questions

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic