본문 바로가기

Study/Java

Java JMF tail: cannot open `+309' for reading: No such file or director

진짜 구글에 없는게 없네요 ...



Solution is here: http://forums.sun.com/thread.jspa?threadID=5368614&tstart=1
First rename the .bin file to .zip
Then with any tool, decompress the zip. It gives a comment that the beginning of the file has bytes that are not part of the zip (this is the script), but it decompress it correctly. It places the file in its subdirectory.
Then rename the file again to .bin, and execute it. It works!

EDIT: This is the real solution:
https://bugs.edge.launchpad.net/ubuntu/+bug/104511

1 - Erase any jmf.bin file that you had download. Download a new one and put in a folder, and check file size:

ls -l

This is a probably result:
-rwxr-xr-x 1 nobody nogroup 2419679 2009-03-07 11:52 jmf-2_1_1e-linux-i586.bin

filezise: 2419679 bytes

2 - Give permission to file:
chmod +x jmf-2_1_1e-linux-i586.bin

THIS IS THE MOST IMPORTANT STEP
3 - Edit jmf-2_1_1e-linux-i586.bin downloaded file with vim as root
vim -b jmf-2_1_1e-linux-i586.bin (YOU HAVE TO USE THIS COMMAND -b BECAUSE IT'S A BINARY FILE)

4 - At vim type this:
/tailPress ENTER.

Then press the key l to move to the left on that line, until the sign +.

Press i to insert text, and insert -n , with a space. Press ENTER.

The new line should be like this:
tail -n +309 $0 > $outname
5 - Now press ESC and type:
:wqPress ENTER.
6 - Now execute the jmf bin file.

That's it.