The Artima Developer Community
Sponsored Link

Java Answers Forum
How to reach methods from ccl.util.Util

4 replies on 1 page. Most recent reply: Mar 6, 2002 10:40 AM by Lizeth

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Lizeth

Posts: 5
Nickname: liz
Registered: Mar, 2002

How to reach methods from ccl.util.Util Posted: Mar 4, 2002 2:34 PM
Reply to this message Reply
Advertisement
Hi,
I need to use one of the methods that are in the class ccl.util.Util.

In the javadoc I can see the class cc.util.Util is inherit from java.lang.Object however when I call the method the compiler give me error message, "the class was not found in the declaration"

I import the java.lang.* and the error still occurs.

The method that I am trying to use is :
stringToDate(java.lang.String sDate_) to convert String to a Date object to insert it in DB.

Please help me!!
I need to insert a Date object into DB but I just have the String value (03/03/2002)
Thanks in advance
Liz


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: How to reach methods from ccl.util.Util Posted: Mar 4, 2002 3:16 PM
Reply to this message Reply
import cc.util.Util;

Lizeth

Posts: 5
Nickname: liz
Registered: Mar, 2002

Re: How to reach methods from ccl.util.Util Posted: Mar 5, 2002 6:35 AM
Reply to this message Reply
Import is the first thing that I tried, however when I compile I get the error:
"Class cc.util.Util not found in import"

I don't know how call this class.

Thanks for any help
Lizeth

Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: How to reach methods from ccl.util.Util Posted: Mar 5, 2002 8:10 AM
Reply to this message Reply
I forgot to add that the class cc.util.Util must be in your CLASSPATH.
The compiler needs to know where to go find that class.
you can also prepend the extra classpath to that class when you compile with the -classpath option as follows:
javac -classpath %CLASSPATH%;.;pathtoclass yourclassfile.java

The little dot or period will have the compiler look in your current directory.

%CLASSPATH% tells the javac executable to substitute the current sting value of the environment CLASSPATH.


pathtoclass is the file path to the cc.util.Util class whereever that is on yur hard drive.

the entries are concatentaed with semicolons ;

Lizeth

Posts: 5
Nickname: liz
Registered: Mar, 2002

Re: How to reach methods from ccl.util.Util Posted: Mar 6, 2002 10:40 AM
Reply to this message Reply
The class cc.util.Util is part of the JDK1.3.1. I did not created, I just want to used.
How I can found where is the class cc.util.Util in my hard Drive?

The classPath has the directories where the JDK should find the classes. Do I have to download something else where this class is contained?

Thanks again.
Lizeth

Flat View: This topic has 4 replies on 1 page
Topic: ClassNotFoundException: xx_Stub with JBuilder5 IDE but fine in DOS prompt Previous Topic   Next Topic Topic: pgm image

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use