Re: Java kxml

From: Tony Morris (dibblego_at_optusnet.com.au)
Date: 01/06/04

  • Next message: jerk: "How to make jboss support install dir contains space?"
    Date: Tue, 6 Jan 2004 11:00:12 +1000
    
    

    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
    "Justin Champion" <j.c.champion@staffs.ac.uk> wrote in message
    news:btcr9d$5uc1a$1@ID-190940.news.uni-berlin.de...
    > 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.
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004
    >
    >
    

  • Next message: jerk: "How to make jboss support install dir contains space?"

    Relevant Pages

    • Re: Running java programs from class files
      ... java -classpath /xyz/abc MyPackage.MyClass ... But put it in a package and it won't. ... So now that you solved that one, show me how to use a jar library on the ... line in the manifest and put the jar file in the same ...
      (comp.lang.java.programmer)
    • Re: Why is String immutable?
      ... All that's required is that the line "Sealed: true" in the JAR manifest. ... Package signing is a different matter. ... If the JVM loads a class from a JAR file with "Sealed: true" in the manifest, then it will ensure that it does not load a class in the same package from a different JAR file. ...
      (comp.lang.java.programmer)
    • Re: How to find a jar in dir tree which contains a special class/package aaa.bbb.ccc
      ... or whole import package ... However I don't know the exact jar which must be added. ... I want a one-line command line command which does the job for me. ... This prefixes each match found by the grep with the path of the JAR file that it was found in: ...
      (comp.lang.java.help)
    • Re: Dynamically load jar resources
      ... >But I also want to allow the user to select another .jar file to use, ... They don't have to match the package names of any ... Then put an index in your main jar to all your other jars. ... Canadian Mind Products, Roedy Green. ...
      (comp.lang.java.help)
    • Re: how to compile this?
      ... What package is A in? ... (A Java package is a very specific thing. ... symbol found" (the compiler can't find class A) when I compiled ... For this to work, given the compilation line you showed, A would have to be in the default package, which I'm not so sure works in a JAR. ...
      (comp.lang.java.help)