amit170394 / sardine

Automatically exported from code.google.com/p/sardine
0 stars 0 forks source link

Why Java 6 ? #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello

Is there a special reason why Sardine requires Java 6? It seems to work
well with Java 5, and many projects (Apache Camel, for example) use Java 5.

Original issue reported on code.google.com by goo...@alishomepage.com on 5 Jan 2010 at 9:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r16.

Original comment by latch...@gmail.com on 5 Jan 2010 at 7:34

GoogleCodeExporter commented 9 years ago
I'm sorry, I did not entirely test this and it looks like it doesn't work that 
easily.

There are two issues:

 * Java 5 doesn't have JAXB 2.1
 * The http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html doesn't have
a constructor with a cause (they've introduced in Java 6)

To support Java 5, we therefore need to:

 * Add jaxb-api-2.1.jar, jaxb-impl-2.1.12.jar and stax-api-1.0-2.jar in the libs
 * Apply the attached patch

Original comment by goo...@alishomepage.com on 5 Jan 2010 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, I forgot to add activation-1.1.1.jar to the list of JARs that need to be 
added
into the libs

Original comment by goo...@alishomepage.com on 5 Jan 2010 at 9:26

GoogleCodeExporter commented 9 years ago
Can you get me the version of JAXB that java 5 supports? I'll just generate the 
code with 
that (assuming it generates decent enough code). btw, I use this eclipse plugin 
to 
generate the code:

https://jaxb-workshop.dev.java.net/plugins/eclipse/xjc-plugin.html

I'm currently generating with JAXB 2.1.4.

Original comment by latch...@gmail.com on 5 Jan 2010 at 10:26

GoogleCodeExporter commented 9 years ago
JAXB API 2.1 + JAXB Implementation 2.1.12 run fine on Java 5 (tested on Windows 
XP
and MacOS X)

PS: Looks like you're running on a Mac. You can:
      export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
  to make ANT use JAVA 5

JAXB 2.1.12 is only a bug fix version compared to JAXB 2.1.4. I don't think 
there are
any bugs on the class generation side, it should rather be parsing-related 
fixes.

Original comment by goo...@alishomepage.com on 5 Jan 2010 at 10:32

GoogleCodeExporter commented 9 years ago
I'm confused. First you said that JAXB 2.1 isn't compatible with Java5 and now 
you are 
saying that it is?

Original comment by latch...@gmail.com on 5 Jan 2010 at 11:28

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r25.

Original comment by latch...@gmail.com on 5 Jan 2010 at 11:33

GoogleCodeExporter commented 9 years ago
your patch has been applied.

Original comment by latch...@gmail.com on 5 Jan 2010 at 11:33

GoogleCodeExporter commented 9 years ago

Original comment by latch...@gmail.com on 6 Jan 2010 at 12:15

GoogleCodeExporter commented 9 years ago
Hello

I didn't say JAXB 2.1 is not compatible with Java 5, I said it is not shipped 
with
Java 5.

This means that JAXB is not part of the JARs that get installed with Java 5. 
They're
only installed starting from Java 6, therefore you need to include these JARs 
in your
classpath manually if you want to use JAXB in Java 5.

--

Checked release 25. It works with Java 5 if the JARs are in the CP.

Original comment by goo...@alishomepage.com on 6 Jan 2010 at 6:13

GoogleCodeExporter commented 9 years ago
Ah ok, sorry for the confusion on my part! =) Not sure if you noticed, but I 
also updated 
the documentation to note that the jars are required for java 5.

thanks again for your contributions. =)

Original comment by latch...@gmail.com on 6 Jan 2010 at 7:10

GoogleCodeExporter commented 9 years ago
Yep, thank you for it. The documentation looks clear.

Any chances you could put a download (even separate) with these JARs (they 
should not
change in time anyway)? I can provide them to you if you like (didn't delete it 
yet,
lol)...

Cheers

--

PS: I would like to apply as a commiter but if you accept my patches for MKDIR 
and
MOVE there won't be any missing functionalities left for me :)

Original comment by goo...@alishomepage.com on 6 Jan 2010 at 7:14

GoogleCodeExporter commented 9 years ago
You want a download of just the jar file? sure, no problemo.

Original comment by latch...@gmail.com on 6 Jan 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Attached the ZIP file with a text file containing the download URLs :)

Original comment by goo...@alishomepage.com on 6 Jan 2010 at 9:07

Attachments:

GoogleCodeExporter commented 9 years ago
yea, distributing the files is a pain. I just linked to them from the 
documentation.

Original comment by latch...@gmail.com on 6 Jan 2010 at 11:35