GeeCON Prague 2014*
The moose likes Sockets and Internet Protocols and the fly likes Major Minor Version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Major Minor Version" Watch "Major Minor Version" New topic
Author

Major Minor Version

Rajkumar Sathiya
Greenhorn

Joined: Dec 15, 2009
Posts: 8
We have developed an API in JDK 1.5
This API is for encrypting File using DES Algorithm.
API works fine in the client location, where they also have JDK 1.5
But it is not working with JDK 1.3
I tried placing jce.jar in classpath but it didnt work
Exception thrown:
Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/crypto/spec/DESKeySpec (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)


Can anyone suggest, how to make it work?
Thanks.
Karl Heinz Marbaise
Greenhorn

Joined: Aug 12, 2007
Posts: 19
Hi,

you have to compile the package for using JDK 1.3, cause JDK 1.5 is not compatible with JDK 1.3...

Kind regards
Karl Heinz Marbaise


Software Configuration Management (Subversion, CVS, SVK etc.) http://www.skmwiki.de/
Subversion Repository Search Engine http://www.supose.org/
Rajkumar Sathiya
Greenhorn

Joined: Dec 15, 2009
Posts: 8
Hi Karl,

Thanks for your response.
I have already complied in JDK 1.3 but then also its not working.
Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

What is the error that you get now..after compiling in jdk 1.3 ?


- Chinna
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42030
    
  64
Where did you get the jce.jar file? It seems to be for use with JDK 1.4; you'll need to find a JCE version that works with Java 1.3. That will be difficult, since Java 1.3 (as well as Java 1.4) have been retired years ago. Sun has some old archived version of JCE 1.2 (which work with Java 1.3), but they're apparently available to US/Canadian users only.

The proper solution is to upgrade to (at least) Java 5.


Ping & DNS - my free Android networking tools app
Rajkumar Sathiya
Greenhorn

Joined: Dec 15, 2009
Posts: 8
Hi Chinna,
When the Major Minor Version Exception occured first, I compiled my package in JDK 1.3 and placed jce.jar
Means before posting my query here, I have have my package in JDK 1.3
From then am getting the same exception.

Thanks.
Rajkumar Sathiya
Greenhorn

Joined: Dec 15, 2009
Posts: 8
Ulf Dittmer wrote:Where did you get the jce.jar file? It seems to be for use with JDK 1.4; you'll need to find a JCE version that works with Java 1.3. That will be difficult, since Java 1.3 (as well as Java 1.4) have been retired years ago. Sun has some old archived version of JCE 1.2 (which work with Java 1.3), but they're apparently available to US/Canadian users only.

The proper solution is to upgrade to (at least) Java 5.


I persuaded my clients to upgrade to JDK 1.5, but they are reluctant to do it.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42030
    
  64
When the Major Minor Version Exception occured first, I compiled my package in JDK 1.3


This error shows that the problem is with JCE, not with your code:
java.lang.UnsupportedClassVersionError: javax/crypto/spec/DESKeySpec (Unsupported major.minor version 48.0)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Major Minor Version