Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JAVA and XML

1 view
Skip to first unread message

gapming

unread,
Aug 12, 2002, 4:57:55 AM8/12/02
to
I have installed Java SDK1.4.0_01 and XML (Xerces-2_0_1)

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.

Jon Skeet

unread,
Aug 12, 2002, 5:39:38 AM8/12/02
to
gapming <gap...@hotmail.com> wrote:
> I have installed Java SDK1.4.0_01 and XML (Xerces-2_0_1)
>
> 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/helpers/DefaultHandler (Unsupported major.minor version 48.0)

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

gapming

unread,
Aug 12, 2002, 10:02:28 PM8/12/02
to
Hi,

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>...

Jon Skeet

unread,
Aug 13, 2002, 3:19:02 AM8/13/02
to
gapming <gap...@hotmail.com> wrote:
> 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?

Have a look at your path - that may well reveal an entry pointing
directly at 1.3.1.

Herlo1

unread,
Aug 13, 2002, 3:39:31 PM8/13/02
to
Jon Skeet <sk...@pobox.com> wrote in message news:<MPG.17c2c344e...@dnews.peramon.com>...

> gapming <gap...@hotmail.com> wrote:
> > 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?
>
> 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

Jon Skeet

unread,
Aug 13, 2002, 4:38:33 PM8/13/02
to
Herlo1 <cmsa...@hotmail.com> wrote:
> > 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

That would help on a Unix box, certainly. Unfortunately the OP is on a
Windows box.

Wendy S

unread,
Aug 14, 2002, 5:35:22 PM8/14/02
to
"gapming" <gap...@hotmail.com> wrote in message
news:f2c17b82.02081...@posting.google.com...

> 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?

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


0 new messages