我需要與下列問題幫助提取後部分:損壞ELF頭/從蝕束
我有兩個不同的蝕產品,它使用其中在linux可執行文件位於同捆,但使用不同的Eclipse插件( 3.5和3.7)來自目標平臺。兩者都運行在:一個32位Debian系統上運行:
Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b06)
。
這兩個應用程序中提取從與bundle.getEntry()
束可執行文件並把它放在一個目錄經由的FileInputStream - >的FileWriter。
然後可執行文件被調用。在一個案例中,它完美地工作,而另一個則沒有。對於3.5版本(工作時),$:file myFile
說以下內容:
ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
和3.7版本(非工作情況下),$:file myFile
說以下內容:
ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), corrupted program header size, corrupted section header size
它們使用相同的操作系統, JRE和Bundle,但是什麼在破壞我的ELF元數據? 我不知道別的地方看看。這是一個Java問題嗎?蝕?圖書館?
這裏複製方法:
URL url = bundle.getBundle(path);
inputStream = url.openStream();
FileWriter fileWriter = new FileWriter(path);
int in;
while ((in = inputStream.read()) != -1)
fileWriter.write(in);
inputStream.close();
fileWriter.close();
new File(path).setExecutable(true, false);