hello all

where is the directory to place file below

import com.toedter.calendar.JDateChooser;

is it correct if the extracted folders and files be placed in folder
c:\com\toedter\calendar\JDateChooser ?

or because i place my source file in c:\java\src

do i have to place the extracted folders and files in

c:\java\src\com\toedter\calendar\JDateChooser ?

I have tried both,but still the same error cannot find symbol FDateChooser

what I must learn to know the cause

any help please


thank you
denny

Recommended Answers

All 5 Replies

soory the in last post the error is "cannot find JDateChooser";

denny

Java will look for your class in the folders and file
com\toedter\calendar\JDateChooser.class

it will start this search from every directory in your CLASSPATH.
So you need to make sure you have those directories and that file in one of the CLASSPATH locations.
If you have a .jar file, java treats that just like a directory.

hello James and all

I have added classpath in javac command as below,still gives same error

javac -classpath c:\com\toedter\jcalendar\JDateChooser\lib\jcalendat-1.4.jar -d build src\Demo.java

thank
denny

I paste the error message below

thank you
denny


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\han>cd c:\java

C:\Java>javac -classpath c:\java\src\com\toedter\calendar\JDateChooser\jcalendar
-1.4 src\Demo.java
src\Demo.java:68: error: cannot find symbol
JDateChooser dateChooser = new JDateChooser();
^
symbol: class JDateChooser
location: class Demo
src\Demo.java:68: error: cannot find symbol
JDateChooser dateChooser = new JDateChooser();
^
symbol: class JDateChooser
location: class Demo
2 errors

Not like that! Please re-read my previous post. Java will start at the classpath, then look in that location for com\toedter\calendar\JDateChooser.class You have put all those directories in the classpath, so Java is looking for
c:\java\src\com\toedter\calendar\JDateChooser\jcalendar\com\toedter\calendar\JDateChooser.class

Based on your classpath, it looks like com\toedter\calendar\JDateChooser.class can be found in c:\java\src, so that's what your classpath should be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.