Hello - has anyone got any experince using the kxml. I have tried importing
the file with the line
import org.kxml.io.*;
I get a error message of Package does not exist. THis is not true I have
put the .jar file which contains this in the directory jdk/jre/lib
Does anyone have any advice ?
Thanks,
Justin.
One very important rule when dealing with any programming language is to not
call it a liar until you are 100% sure that it is, in fact, lying.
My previous experience teaching university students to use Java and various
other languages leads me to suggest that, the compiler is not lying and that
you have an error of some type (perhaps a misunderstanding of the use of
third party packages). The compiler is telling you that the package that
you are referring to does not exist.
Check your system CLASSPATH for typos (be vigilant !). If you are confident
that the jar (or whatever it is) is in the CLASSPATH, check manually, by
opening the jar or directory structure to ensure that the package does
actually exist. I have also had problems in the past where the JAR file
opened successfully with some independant application such as Winzip, but
failed when the command-line jar was used - check for validity of the jar
(if this is how it is distributed).
Failing all, erase your system CLASSPATH (they are evil anyway), and
manually set it at compile time with the -classpath switch, who knows, you
might discover a typo that you missed.
I use Apache Ant for such things as compiling, etc. If I specify a jar file
to be used for the -classpath switch and it doesn't exist, I know this
immediately when I invoke ant in verbose mode (-v), because it points it
out. This technique of using a third party application (and not human eyes)
will help to ensure that you have no typos.
Good luck.
--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
> Hello - has anyone got any experince using the kxml. I have tried importing
> the file with the line
[quoted text clipped - 12 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004
Andrew Thompson - 06 Jan 2004 08:05 GMT
..
| ....I have also had problems in the past where the JAR file
| opened successfully with some independant application such as Winzip, but
| failed when the command-line jar was used - check for validity of the jar
| (if this is how it is distributed).
That could be because some idiot like me
lazily used WinZip to create a .jar, when
they had WinZip's non-standard 'maximum
compression' flag set..
[ It is so quick and handy, though! ;-) ]
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
| Hello - has anyone got any experince using the kxml. I have tried importing
| the file with the line
| import org.kxml.io.*;
| I get a error message of Package does not exist. THis is not true I have
| put the .jar file which contains this in the directory jdk/jre/lib
Try specifying it in the classpath from
the command line, e.g...
javac -classpath .;C:/ThePath/kxml.jar *.java
HTH
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
> Hello - has anyone got any experince using the kxml. I have tried importing
> the file with the line
[quoted text clipped - 3 lines]
>
> Does anyone have any advice ?
It's in the wrong place. You want to put it in jdk/jre/lib/ext . Then
you won't have to mess around with classpaths.
thufir - 13 Jan 2005 15:12 GMT
I've been to
<http://java.sun.com/docs/books/tutorial/java/interpack/managingfiles....>,
but can't figure out what I need to download, nor which
directory to put it in.
?jdk/jre/lib/ext?
The errors:
javac -classpath ".;C:\Documents and
Settings\Administrator\Desktop\source\jTidy" -g "C:\Documents and
Settings\Administrator\Desktop\source\jTidy\Test16.java"
C:\Documents and
Settings\Administrator\Desktop\source\jTidy\Test16.java:7:
package org.w3c.tidy does not exist
import org.w3c.tidy.Tidy;
^
C:\Documents and
Settings\Administrator\Desktop\source\jTidy\Test16.java:40:
cannot find symbol
symbol : class Tidy
location: class Test16
Tidy tidy = new Tidy();
^
C:\Documents and
Settings\Administrator\Desktop\source\jTidy\Test16.java:40:
cannot find symbol
symbol : class Tidy
location: class Test16
Tidy tidy = new Tidy();
^
3 errors
Thanks,
Thufir Hawat
Heiner K?cker - 13 Jan 2005 17:43 GMT
> I've been to
> <http://java.sun.com/docs/books/tutorial/java/interpack/managingfiles....>,
[quoted text clipped - 29 lines]
> ^
> 3 errors
Add the jar file with appropriated classes to your classpath
javac -classpath <path>;<path and name>.jar

Signature
Heiner Kuecker
Internet: http://www.heinerkuecker.de http://www.heiner-kuecker.de
JSP WorkFlow PageFlow Page Flow FlowControl Navigation: http://www.control-and-command.de
Java Expression Formula Parser: http://www.heinerkuecker.de/Expression.html
CnC Template Technology http://www.heinerkuecker.de/Expression.html#templ
thufir - 13 Jan 2005 19:46 GMT
C:\Documents and
Settings\Administrator\Desktop\jtidy-04aug2000r6\build\Tidy.jar
seems to be the only .jar. do you know if that's correct?
Heiner K?cker - 13 Jan 2005 22:16 GMT
> C:\Documents and
> Settings\Administrator\Desktop\jtidy-04aug2000r6\build\Tidy.jar
> seems to be the only .jar. do you know if that's correct?
Eventually are the spaces in the directory name
'C:\Documents and Settings\'
an problem.
Use better an other sub directory.
Heiner Kuecker
Internet: http://www.heinerkuecker.de http://www.heiner-kuecker.de
JSP WorkFlow PageFlow Page Flow FlowControl Navigation: http://www.control-and-command.de
Java Expression Formula Parser: http://www.heinerkuecker.de/Expression.html
CnC Template Technology http://www.heinerkuecker.de/Expression.html#templ
thufir - 14 Jan 2005 14:27 GMT
Heiner Kücker wrote:
[..]
> Add the jar file with appropriated classes to your classpath
>
> javac -classpath <path>;<path and name>.jar
For example
C:\>javac -classpath
C:/java/java/jTidy/Test16.java;C:/java/org/w3c/foo.jar
Is that correct?
thanks,
Thufir Hawat