My operating system is Ubuntu Linux 11.04 and I am using Java Slick library to build a game in these days. I faced the following error when I tried to load sounds using Music backMus=new Music(“path/to/file”); .
AL lib: oss.c:179: Could not open /dev/dsp: No such file or directory
ERROR:Sound initialisation failure.
ERROR:Could not locate OpenAL library. org.lwjgl.LWJGLException: Could not locate OpenAL library.
Searched everywhere for hours to find a solution for this and tried many guides which were written to solve this problem, but none of them were a success. Finally I got to know that this error is caused because Slick library uses a very old version of LWJGL (Light Weight Java Gaming Library). If you too are having this same problem use the following guidelines to rectify it.
- Download the latest version of LWJGL from http://lwjgl.org/download.php.(Download the file named lwjgl-x.x.x.zip).
- Extract the downloaded file.
- Copy the libraries that you are using from the jar folder in the extracted directory to your games Slick library folder. (Confirm file overwrites).
- Copy the relevant native files from the native folder to your games Slick natives folder. (Confirm file overwrites).
- Now reload the libraries in your IDE-if you are using any (For an example,in Net Beans remove all the slick libraries and add them again).
Now the game will play the sounds smoothly…!
Some of you may have experienced the problem of Conky being over the windows when the machine starts. So you have to manually restart Conky using killall conky; conky . But this can be easily avoided by editing the .conkyrc file. All you have to do is to set the “own_window_type” option to “normal”. Then Conky will appear under the windows when the OS restarts.
How to check whether mod_rewrite is installed?
Create a text file named check.php in the www folder and insert the following code to it.
<?php phpinfo(); ?>
Then go to the web page in your browser using the url “localhost/check.php”. Then you’ll see information about the php version of the system. Under the “Configuration” title there’s another title called “apache2handler”. In that table there’ll be a entry named “Loaded Modules”. Check to see if it contains the name “mod_rewrite “.If you can see that name then mod_rewrite is installed to apache.
If mod_rewrite is not installed?
mod_rewrite can be installed using the “sudo a2enmod rewrite” command in the terminal.
How to check whether mod_rewrite is working properly?
A good tutorial on this can be found in http://www.webune.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html.
mod_rewrite is not working even though it is installed?
Navigate to /etc/apache2/sites-enabled as root and open the text file “000-default”. Then replace all the “AllowOverride None” with “AllowOverride All”( There’ll be 3 entries ). Then restart apache using sudo /etc/init.d/apache2 restart .
This should solve the problems.