tools4j / unix4j

An implementation of Unix command line tools in Java.
unix4j.org
MIT License
231 stars 43 forks source link

Cannot run on J2SE 6 #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use jdk6 load class Unix4j

What is the expected output? What do you see instead?
run correctly, but outputs: 
{{{
Exception in thread "main" java.lang.UnsupportedClassVersionError: 
org/unix4j/Unix4j : Unsupported major.minor version 51.0
}}}

What version of the product are you using? On what operating system?
mac 10.6 + jdk6

Please provide any additional information below.
--

I don't if unix4j supports j2se 6, if supports you can assign the compile fit 
j2se 6.

Original issue reported on code.google.com by jht5...@gmail.com on 8 Jul 2013 at 3:11

GoogleCodeExporter commented 9 years ago
sorry for late response, we didn't get notifications.

Original comment by terz...@gmail.com on 6 Nov 2013 at 8:22

GoogleCodeExporter commented 9 years ago
Unix4j makes use of some java 7 features, for instance posix file flags in the 
ls command.

However, we have tried hard to make unix4j compile also with jdk6. Compilation 
however is not possible with target version 6, i.e. we cannot support both jre6 
and 7 with the same jar. See for instance here:
http://stackoverflow.com/questions/6699347/jdk-7-class-file-backward-compatibili
ty-with-jdk-6

Unfortunately there are some minor elements in our 0.3 code that are not 
compliant with jdk6. We have fixed those problems and 0.4 will be compatible 
with jdk6. You can download the sources (e.g. via git clone) and do a maven 
install:

git clone https://terzerm@code.google.com/p/unix4j/
cd unix4j
mvm clean install

Original comment by terz...@gmail.com on 6 Nov 2013 at 11:39