2012-11-06 79 views
0

我的Java类是这样的;javac因错误而失败JNU_GetStringPlatformChars:未找到引用的符号

import oracle.sqlj.runtime.Oracle; 
import sqlj.runtime.ref.DefaultContext; 

class Test 
{ 

    public static void main (String args[]) throws SQLException 

    { 

    Connection conn=null;; 
    PreparedStatement ps=null; 

    Oracle.connect(TestInstallCreateTable.class, "connect.properties"); 

conn = DefaultContext.getDefaultContext().getConnection(); 

try { 
    ps = conn.prepareStatement("DROP TABLE SALES"); 

    ps.executeUpdate(); 

} catch (SQLException e) { 
     ;    
} 

} 
} 

我看到以下javac与jdk7的错误。

ld.so.1: javac: fatal: relocation error: file 
/jdk7/jre/lib/sparc/libzip.so: symbol JNU_GetStringPlatformChars: referenced symbol not found 

为什么会发生?

+0

您是否包含了所有导入?看起来你错过了一些。 – david99world

+0

在usr/lib /中是否有ld.so? – gks

+0

我看到32位模式下的故障。 – sunmoon

回答

2

你在你的机器上安装了ia32-libs吗?试图在没有安装该库的amd64 linux实例上以32位模式运行64位Java时,发现了类似的错误。

安装该库(在我的情况下,debian上的apt-get install ia32-libs)解决了这个问题。

相关问题