Installing BoardCad (or other java apps) on Elive 3.8.30
BoardCad is an application for Computer Assisted Drawing of surfboards. Alas it's old abandon-ware and clearly designed with Windows PCs in mind, even though it's Java so, practically should run on any system that can run java runtime environment.
Finding and downloading the app on sourceforge isn't very hard.
The download will contain a 'BoardCAD_unix_3_0_1.sh' file which is the installer.
You double click that .sh file (or right-click and opt for 'open with"elive-run helper')....which should start the installer where you do NOT need (or want) sudo or root privileges.
Being a 'java' program it normally wouldn't require anything other than the 'default-jre' package.
In a 'terminal' do 'api default-jre'
which will install openjdk version 11. Do that if it isn't already installed as you might need it later for other java apps.
There's a catch, alas!
This particular app is very old and requires an equally old version of java: openjdk-8.
To solve that, first you'll need to install that version too, which can be done with:
'api nvidia-openjdk-8-jre'
But that's not all, as you'll also need to register that version as an available one with:
'sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/bin/java 100'
When all that is done then 'boardcad' can be started from it's install directory (taking that it's in your $HOME) with:
'/usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar BoardCAD/BoardCAD.jar'
Once that all that appears to work as it should, one could create a .desktop file with which to open 'boardcad' and add that to the dock in use, be it 'cairo-dock', 'plank' or 'tint2'.
Creating that file is going to be easy enough, where the BoardCAD.desktop file doesn't have to be in /usr/share/applications/ (which would require 'sudo' privileges) ..... it can be anywhere, including inside the BoardCAD directory itself....it's not a system-wide available app, after all.
The .desktop file should point to an executable and considering that the starting up in a terminal is fraught with possible typos and on top there's also a point of setting the right path.
-
let's create a startup command called 'boardcad' in a ''.local/' directory in your $HOME (if it isn't there create it):
'echo "/usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar ~/BoardCAD/BoardCAD.jar" > ~/.local/boardcad'
-
then we make it executable:
'chmod +x ~/.local/boardcad'
and check if it's all right to run:
'exec ~/.local/boardcad'
-
If that works, create a BoardCAD.desktop with the following content:
Name=BoardCAD
Exec=~/.local/boardcad
Terminal=false
Type=Application
Icon=~/BoardCAD/boardcad/icons/BoardCAD.png
comment=BoardCAD java application
keywords=Board;CAD;cad;
Categories=Graphics;
-
Where I created an icon by downsizing an existing .png and placing it in the 'BoardCAD/boardcad/icons/'' directory.
-
The icon is here:
Save that BoardCad.desktop somewhere safe and then drag&drop that .desktop file onto cairo-dock.
Cairo-dock customization.
Once moved onto Cairo-dock the icon as stated in the .desktop should show thus:
And it should start up 'boardcad' when clicked.
If you want a different icon just right-click the icon and opt to edit it:
which'll open this widget where you can search for any appropriate icon on your system.
Where 'cairo-dock' isn't too worried by spaces in the icon naming scheme, so let's choose a nice big enough one from the BoardCAD icons directory i.e 'BoardCAD png 256x256.png' which has way too many spaces for the .desktop path (even if the spaces are commented out with backslashes).
Now 'boardcad' itself tends to show another (unusable) icon when it runs so if you're really unhappy with that ..... and don't feel like mucking about in the java/jython code: Change it too, with a right-click and choosing one to your taste or the same as the starter icon.