Installing on Linux (FC3)

Dear List,



I’ve done all the cvs/ ant stuff, which went fine. BUT - when I try and run a demo with:



[measauser@localhost jme]$ java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./lib/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.jar jmetest.effects.TestDynamicSmoker.class



I get:



bash: ./lib/jogg-0.0.5.jar: cannot execute binary file

bash: ./lib/jorbis-0.0.12.jar: cannot execute binary file

bash: ./target/jme.jar: cannot execute binary file

bash: ./target/jmetest.jar: cannot execute binary file

bash: ./target/jmetest-data.jar: cannot execute binary file



I’ve never seen this error before - any ideas ? I’ve checked the permissions (and 777 them all and recompiled) but no luck. Any ideas?



Matt

It seems that the bash command you try to invoke makes bash want to execute the jar files - which in your posting happen to be in a new line. Is there a newline between cp and ./lib/lwjgl.jar in your script or is this just the formatting in the forum post?

Thanks for spotting that - I tried retyping it, to no avail - same error message. I also tried re-pasting the error, and the line break is an artefact of the forum. There needs to be a space after -cp, and so I guess the forum uses it to break the line.





I think I know what the problem is: All the .class files in build are 777x, but all the .class files in the jar (when I then unzip it) are more like 755-, which might be why I can’t execute them. I can fix the jme ones, but I’m not sure how to fix the external jars…



Has anyone come across jar files doing this before ?



Matt



java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./lib/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.jar jmetest.effects.TestDynamicSmoker.class

jme was broken up, into jme, jmex.effect, jmex.terrain and so on, I see you trying to run dnamicsmoker but the effects jar isn’t in the classpath

Okay, I’ve fixed at least one small problem:



The reason the command threw the errors “bash: ./lib/jogg-0.0.5.jar: cannot execute binary file” is because the dem executing command has a little flaw in it:



java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./lib/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.jar jmetest.effects.TestDynamicSmoker.class might work ok on windows, but on Linux, the cp seperator is :, not ;. So, when you try and execute the command, it thinks you want to execute one of the jars, and barfs.



HTH others using Linux,



Matt

In linux you must use ‘:’ as seperators, not ‘;’, secondly, you do not include .class at the end of the class name when using the java executable.