0

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

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by JamesCherrill
0

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

denny

0

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.

Edited by JamesCherrill: n/a

0

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

0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.