Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

jdbc questions  RSS feed

 
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
 
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 ?
 
Sheriff
Posts: 67259
170
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.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!