unable to compile jTDS 1.3 sources using jdk6
Brought to you by:
ickzon
I am trying to compile jTDS 1.3 sources on my linux box with jdk6 installed. However the compile is failing...
--
Buildfile: build.xml
init:
prepare:
compile:
[javac] Compiling 65 source files to /home/khichdo/DevTools/jtds/code/branches/jTDS 1.3 (stable)/build/classes
[javac] /home/khichdo/DevTools/jtds/code/branches/jTDS 1.3 (stable)/build/src/net/sourceforge/jtds/jdbc/SharedSocket.java:139: illegal start of type
[javac] private final ConcurrentMap<Integer,VirtualSocket> _VirtualSockets = new ConcurrentHashMap<>();
[javac] ^
[javac] 1 error
BUILD FAILED
/home/khichdo/DevTools/jtds/code/branches/jTDS 1.3 (stable)/build.xml:56: Compile failed; see the compiler error output for details.
--
what am I doing wrong?
Thanks.
Hi, for JDK 1.6 you can use the latest jTDS 1.2 version. The jTDS 1.3 versions require Java 7.
Cheers,
momo
Thanks for that info.
However, even 1.2 branch is not compiling using jdk6
--
compile:
[javac] Compiling 67 source files to /home/khichdo/DevTools/jtds/code/branches/jTDS 1.2 (stable)/build/classes
[javac] /home/khichdo/DevTools/jtds/code/branches/jTDS 1.2 (stable)/build/src/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java:2655: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] /home/khichdo/DevTools/jtds/code/branches/jTDS 1.2 (stable)/build/src/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java:2661: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] /home/khichdo/DevTools/jtds/code/branches/jTDS 1.2 (stable)/build/src/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java:2667: method does not override or implement a method from a supertype
--
Sorry, my fault. The jTDS 1.2 branch is meant to be fully backward compatible with Java 1.3. There also is a build script for Java 1.4 and Java 5 (simply cutting off part of the source files before compiling), but not for Java 6 (and the other scripts cut off too much of the sources for Java 6). So there is actually no straight way of compiling jTDS using a Java 6 JDK - you would have to adopt the sources, which should be a simple task, btw. I guess there is a good reason you are using Java 6?
Cheers,
momo
Yes, our codebase is compiled against java-6, that is why we want to use java-6 for this. We are looking into adding support for table valued parameters to jtds.