News:

click the little + - buttons to customise your Fibsboard (unclick them sometimes to see what you're missing :)

Main Menu

My dices Show no numbers (under Ubuntu)

Started by Maat, June 21, 2010, 04:35:23 PM

Previous topic - Next topic

Maat

I'm using javafibs 2001 JavaFIBS-1.0.12 and I launch it trough this command "java -jar JavaFIBS-1.0.12_java16.jar"

Vector board (default) shows the dices but nothing is written on them, I've tried to change the color of the dices but doesn't help...

Edit:

Forgot to mention that it runs under Linux (Ubuntu Lucid Linx)

Any Idea?

ah_clem

Make sure that the pips are a different color than the dice. 

Go to Preferences -> board -> Colors/Textures

Make sure Player(1) and Player(2) are contrasting colors
Likewise for Opponent(1) and Opponent(2).

Maat

Sorry, I had already tried that, there should be a bug somewhere,

- It only happens when I run javafibs by "java -jar JavaFIBS-1.0.12_java16.jar"
- If I run it just by clicking on the icon... dices behave OK, but running this way I loose all the buttons and textures in the vector board...

Thank you anyway

Maat

Well, after much investigation I've found a workaround, I'll expose it here just in case someone needed it:

For some reason that escapes to my understanding when you try to bring up the javafibs from command line or from a script (java -jar etc) it loads the program, the icons, etc but when trying to use the vector board dices doesn't show the results.

On the other hand, if you launch the program by double clicking in the icon, the program works but it doesn't show any button/icon...
For various reasons I suspected that javafibs was looking for components it need in my home directory (when starting by clicking on the icon)

SO:

I copied the content of the javafibs folder into my Home folder... now I can play by clicking on the javafibs icon, Clicking in the icon in my home folder has the same effect as clicking in the one in the old folder since now javafibs can find things where it expected... but starting it by command line makes it fail.

Well now I can play untill someone came up with a solution.

PD: Remember that this workaround is for Ubuntu Lucid...


ah_clem

I'm more familiar with java on windows, but it sounds like you have a path dependency here - when you launch it through the command line it looks for it's component pieces in the current directory or any paths you have set in the environment.  When you click on the icon, the current directory is different so it looks in a different place, Neither had all the pieces, but once you copied the files over to your home folder that made the icon-launched invocation find them.   You could accomplish the same thing by copying the contents into whatever directory you launch the command line from, but it would be easier to just cd over to your home directory before launching the command line. Alternatively, you could set your default environment path to include your home folder, or set it via the command line just before launch.


sixty_something

also, make sure you have the correct "Start in" directory specified .. you can check that by looking at the properties of the desktop shortcut (right click the shortcut and select Properties) .. for example, mine is "C:\Documents and Settings\All Users\Start Menu\Programs\Games\FIBS Backgammon" which is the directory where i installed JavaFIBS .. that should enable you to start from the desktop icon

nm, i just remembered you are using Linux - good luck
A little inaccuracy sometimes saves tons of explanation. -- Unknown
e-mail me

dorbel


croddy

sixty_something has got the wrong OS, but the right solution. i ran into this same problem on debian.

make a wrapper script that changes directories to the directory with all the javafibs stuff in it before running java -jar, and everything should just work.

mine looks like this:

#!/bin/sh
cd /home/cmr/lib/JavaFIBS2001
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar JavaFIBS-1.0.12_java16.jar

NIHILIST

Thx for the narrative. I'm building a new computer and hadn't decided to use Ubunto or Win 7. You've just given me the rationale to use Windows.

Bob
Robert J Ebbeler

familyoutlaw

I had this problem on Ubuntu Lynx and tried all these things to no avail. In the end someone on the ubuntu-uk chat room advised me to try the sun java.
By mistake I installed the sun jdk instead of jre and now I can see the pips on  the dice. Woo-hoo! Not sure if just using the jre would would work or not. But the jdk install + removing the open jre  certainly did the trick! Rock on Ubuntu!! (It ain't for the faint-hearted!) Rock on FIBS!!!

blitzxz

#10
This is bullshit. Clear bug in JavaFibs. Nothing works. Only the last advice helped. To solve this is you have to use sun java sh**.

You need to update your repositories in 10.04 with these commands:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update

After this you can install sunjava from software center. To use sun java and not openjava you can right click the jar-file or you could just uninstall openjava.