使用Java 1.8安装MonetDB错误 - 不支持的major.minor版本52.0

时间:2015-03-20 06:21:53

标签: monetdb

我遵循HannesMühleisen描述的MonetDB安装程序,运行下面描述的命令1到6。

how do I install MonetDB on Centos 6.5?

  1. sudo yum install openssl-devel pcre-devel
  2. tar xvf MonetDB- .tar。
  3. cd MonetDB - *
  4. ./配置
  5. 使
  6. sudo make install --->在此步骤中失败
  7. Java Home机器是/usr/lib/java/jdk1.8.0_25。显然,安装试图在其他地方找到1.7版本

    这是错误文本

    make[4]: Entering directory `/usr/local/MonetDB-11.15.19/java/tests'
    make  all-am
    make[5]: Entering directory `/usr/local/MonetDB-11.15.19/java/tests'
    "/usr/local/ant/bin/ant" -f "`readlink -f ./build.xml`" -Dbuilddir="`readlink -f /usr/local/MonetDB-11.15.19/java/tests/jar_jdbctests`" -Djardir="`readlink -f /usr/local/MonetDB-11.15.19/java/tests`" -Dbasedir="`readlink -f .`" jar_jdbctests
    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/lib/tools.jar
    Buildfile: /usr/local/MonetDB-11.15.19/java/tests/build.xml
    
    prepare:
    
    find_driver:
    
    BUILD FAILED
    /usr/local/MonetDB-11.15.19/java/tests/build.xml:87: java.lang.UnsupportedClassVersionError: nl/cwi/monetdb/jdbc/MonetDriver : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1136)
        at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1307)
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1362)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1323)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1076)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.apache.tools.ant.taskdefs.Available.checkClass(Available.java:454)
        at org.apache.tools.ant.taskdefs.Available.eval(Available.java:285)
        at org.apache.tools.ant.taskdefs.condition.And.eval(And.java:42)
        at org.apache.tools.ant.taskdefs.ConditionTask.execute(ConditionTask.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    

1 个答案:

答案 0 :(得分:0)

我认为此计算机上安装了两个不同的Java VM,由于某些原因(怀疑每个用户设置为$JAVA_HOME和/或$PATH)导致使用make 1.8和sudo make install使用1.7。 UnsupportedClassVersionError至少表明了这一点。我建议你确保只使用一个版本。

对于CentOS,应该这样做:

sudo /usr/sbin/alternatives --config java
sudo /usr/sbin/alternatives --config javac

更新:结果MonetDB现在提供CentOS rpms:https://www.monetdb.org/downloads/epel/