Installing BoardCad (or other java apps) on Elive 3.8.30

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.

  1. 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'

  2. then we make it executable:
    'chmod +x ~/.local/boardcad'
    and check if it's all right to run:
    'exec ~/.local/boardcad'

  3. 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.

3 Likes

Very detailed. You must have been at it all weekend. I certainly appreciate the hard work. I'm sure it will help others needing to learn the technique for adding the short cut. I shall post my progress as I go.

No, about 2 hours I think and ..... doing other stuff on the side like booking a short holiday in April and searching for a 2016 documentary: "Santoalla". :smiley14:

If I can install it in 2 hours it will be a first. :sweat_smile::sweat_smile:

well done, nice and appealing -

am surprised you are using images nowadays ....

respect, nice job

Mainly because the screenshot tools allows such easy uploading and linking to 'imgur.com' which doesn't hog the elive server with uploaded images.

  • It does require a manual setting of the size (using a html 'div' line) to have a proper consistent look though. :frowning_face:

Keep in mind that Imgur's terms of service are against uploading images solely for hotlinking.

Nice one, from technical point of view.
But it wasn't me, if there is not at least one remark: I am missing your favorite surf spot, to present the painting :wink:

No, great. A friend of mine used to hand paint boards. I've seen her often doing it in the backyard, but never on the waves.
-> My favorite spot is Hvide Sande, Denmark.

1 Like