janvanbesien / java-ipv6

Java library to represent IPv6 addresses, networks, and related concepts
Apache License 2.0
85 stars 33 forks source link

doesn not work with java 6 #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. include jar in a project that uses Java 6
2. use constructor IPv6AddressRange(....)

What is the expected output? What do you see instead?

java.lang.UnsupportedClassVersionError: Bad version number in .class file

What version of the product are you using? On what operating system?
version=0.4
windows xp

Original issue reported on code.google.com by johninwi...@gmail.com on 20 Apr 2012 at 3:49

GoogleCodeExporter commented 9 years ago
The library was developed with java7 and depends on some small things only 
available since java7 in the API of BitSet. If you really need a java 6 version 
though, I am willing to consider it.

Original comment by janvanbesien@gmail.com on 11 May 2012 at 3:06

GoogleCodeExporter commented 9 years ago
A version for java6 would be very helpful. One thumb up ;-)

With java6 I get:

javax.servlet.ServletException: java.lang.UnsupportedClassVersionError: 
com/googlecode/ipv6/IPv6Address : Unsupported major.minor version 51.0 (unable 
to load class com.googlecode.ipv6.IPv6Address)

Original comment by markus.f...@bz-gs.so.ch on 7 Jun 2012 at 9:30

GoogleCodeExporter commented 9 years ago
...well, there is a simple but ugly workaround, since the only method missing 
in java6 is BitSet.valueOf(long[]) from java7:

One may download the Class BitSet from java7, add it to to the sourcecode, 
reorganize the imports and create a new jar file.

http://www.docjar.com/src/api/java/util/BitSet.java

Original comment by markus.f...@bz-gs.so.ch on 7 Jun 2012 at 11:27

GoogleCodeExporter commented 9 years ago

Original comment by janvanbesien@gmail.com on 8 Jun 2012 at 5:58

GoogleCodeExporter commented 9 years ago
Fixed in version 0.7. It is now java6 compatible.

Original comment by janvanbesien@gmail.com on 8 Jun 2012 at 6:12

GoogleCodeExporter commented 9 years ago

Original comment by janvanbesien@gmail.com on 2 Oct 2012 at 6:30