but I can't run the sample program by:
java sax.Counter data/personal.xml
and the following errors appear:
E:\xerces-2_0_2>java sax.Counter e:/xerces-2_0_2/data/personal.xml
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/xml/sax/h
elpers/DefaultHandler (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Does anyone has suggestion?
Thanks.
That means you're not actually running Java 1.4.0_01. Type java -version
and see what happens.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
When i type java -version, it shows:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
After I have reinstalled JDK 1.4.0_01, it still shows the 1.3.1
version, how can i solve it?
Thanks.
Jon Skeet <sk...@pobox.com> wrote in message news:<MPG.17c192b13...@dnews.peramon.com>...
Have a look at your path - that may well reveal an entry pointing
directly at 1.3.1.
This also may help:
which java
which will reply something like:
/usr/bin/java
when what you really want is:
jdk_install_dir/bin/java (jdk_install_bin is where you chose to put JDK1.4)
Cheers,
Hope this helps
Herlo1
That would help on a Unix box, certainly. Unfortunately the OP is on a
Windows box.
Are you using Windows? Use the 'search' function to find all of the
'java.exe' files on your system.
I have _eight_ of them-- three from JBuilder, one from Macromedia, three
from the my install of 1.4.0, and another one in C:\WINNT\system32 that came
from who knows where (but at least it's 1.4.0!)
Look at your 'PATH' environment variable. One of the "older" java.exe files
is being found before the one that you want.
You can get rid of the java.exe files that you don't want (don't break
anything else while doing this-- rename them to javaold.exe and make sure
nothing else is using them.). You can rearrange your PATH variable so that
the one you want is found first, or you can specify the entire path to the
java.exe that you want to use.
For example, I can run under 1.3.1 by saying c:\JBuilder\jdk1.3.1\bin\java
ClassName, or I can use c:\j2sdk1.4.0\bin\java ClassName for 1.4.
--
Wendy in Chandler, AZ