gdude2002 / jarjar

Automatically exported from code.google.com/p/jarjar
2 stars 1 forks source link

1.0rc4 compiled against java5 (for a reason?) #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download jarjar-1.0rc4.jar
2. Try to use it with jvm 1.4

What is the expected output? What do you see instead?
The jarjar task in my build file work :)

The output is:
BUILD FAILED
java.lang.UnsupportedClassVersionError: com/tonicsystems/jarjar/JarJarTask
(Unsupported major.minor version 49.0)

Total time: 1 second
toomasr@cigarette:~/weaver$ java -version
java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

What version of the product are you using? On what operating system?
1.0rc4

Original issue reported on code.google.com by toom...@gmail.com on 4 Jul 2007 at 12:56

GoogleCodeExporter commented 9 years ago
Checked out the source to search for your email address because when I started
hosting a project@code.google I did not get emails about added issues and had to
enable it from somewhere.

Anyways I compiled it with jdk1.4 and can use the updated the version. 
Hopefully the
final version will be compiled against 1.4 as it did compile with 1.4 at the 
moment.
I've added a build.xml diff although it is easier just to go in and change the 2
lines by hand.

Nice tool, thx :)

Original comment by toom...@gmail.com on 4 Jul 2007 at 1:22

Attachments:

GoogleCodeExporter commented 9 years ago
Previously jarjar would run on JDK 1.2+. Because the license has changed to 
Apache 2
I had to remove the use of GNU classes and switch to Java regexps, which are in 
1.4+.
I figured that I might as well just make it 1.5 and then I could rewrite jarjar 
using
generics, annotations, etc.

Can I ask why you need to use jarjar in a 1.4 environment? Perhaps I will 
investigate
retroweaver. In the meantime I'll make sure that rc5 is 1.4 compatible.

Original comment by chris.no...@gmail.com on 5 Jul 2007 at 12:01

GoogleCodeExporter commented 9 years ago
The project I'm involved in uses jdk1.4. I have different jdks installed and can
compile everything for the targets I'm interested in (1.4 in this case) 
whichever >
1.4 jdk I use. So I don't have to use jarjar in a 1.4 environment, I just have 
to
reconfigure a bit my system.

As this is a big step (jdk1.4 -> java5) for rc3->rc4 (probably one of the last 
RC's
before release) and did not notice a changelog (well i did not search for it, 
it is
usually thrown in the face :) ) stating the change I figured it must have 
happened by
mistake.

Until you start using the features Java5 offers please maintain 1.4 
compatibility as
more users will have a better out-of-the-box experience.

Original comment by toom...@gmail.com on 5 Jul 2007 at 12:56

GoogleCodeExporter commented 9 years ago
I've uploaded rc5 which is the same as rc4 but compiled to JDK-1.4-compatible
bytecode. I've also added a changelog which is linked from the home page.

I will revisit upgrading to 1.5 for jarjar 1.1.

Original comment by chris.no...@gmail.com on 5 Jul 2007 at 1:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In addition, it seems to me 1.0rc6 can't scan jars that were built under 1.6? 
I'm
getting:

Exception in thread "main" 
java.lang.IllegalStateException: ClassReader.accept() should be called with
EXPAND_FRAMES flag
        at com.tonicsystems.jarjar.asm.commons.LocalVariablesSorter.visitFrame
        at com.tonicsystems.jarjar.asm.commons.RemappingMethodAdapter.visitFrame
        at com.tonicsystems.jarjar.asm.ClassReader.accept
        at com.tonicsystems.jarjar.asm.ClassReader.accept
        at com.tonicsystems.jarjar.DepFind.run(DepFind.java:56)
        at com.tonicsystems.jarjar.Main.find(Main.java:72)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.tonicsystems.jarjar.IoUtils.runMain(IoUtils.java:98)
        at com.tonicsystems.jarjar.Main.main(Main.java:40)

Original comment by coco...@absolute-gewinner.de on 20 Nov 2007 at 5:09