Category: Development

Eclipse commandline option for workspace and settings

I have separate Eclipse packages installed and don’t want them to use the default .eclipse setting folder in Home.

Suppose following layout

#unpacked Eclipse archive

#chosen configuration folder

#chosen workspace folder

Then a call/script/menuitem of the following type (single line) will use those:

-vmargs -Dosgi.instance.area.default=~/workspaceCdt -Dosgi.configuration.area=~/config/eclipseCdt


  • use of any folders
  • clean updates by deleting old eclipse-folder and unpacking new version
  • no more fiddling and remembering to put entries in eclipse.ini play favorite tag from every page

I like from since back when Pandora became geofenced. One thing, which is kind of annoying, is that you have to jump through hoops to get your favorite tag started. I exclusively want that one tag as station and instead of just setting a bookmark, I wanted to have a go with GreaseMonkey to have a seamless ‘built-in’ experience. And not just changing the window.location but having a button left of the ‘<<‘ (previous) at the always visible player.

With very little exposure to javascript before, I was pleasantly surprised about the ease of finding information. Sadly from multiple decades, different styles, versions, …

Right-click and “Inspect Element” on the player yielded:

developer console view of inspected player element

Aha, the player is an <ul> (unordered list) in HTML, and is of class ‘media-controls’. The button to play the tag is more interesting:

developer console view of inspected 'play alternative rock tag' button

Three classes, custom attributes.

It took about 30 min. to patchwork something together by searching the web for things like “greasemonkey button insertion” “javascript select by class” and the like. Debugging seems a lot easier today with the browser console, if it were available at the start of this millenium maybe I could’ve had a more thorough dip into JS.

New button visible in player

Now, on all pages at I have an extra button for my alternative-rock-tag. Nice.

// ==UserScript==
// @namespace aoe
// @name lastfm play Alternative tag
// @version 1.0
// @description Add button to play Alternative-tag
// @include*
// @include*
// @run-at document-start
// @grant none
// ==/UserScript==

//the above comments are interpreted by Greasemonkey, the 
//@include* enables the script on all pages 

  'use strict'
   window.addEventListener('load', () => {

   function addButton() {
//create new button as list element
     let liel = document.createElement('li');
     let btn = document.createElement('button');
//add the details learned from inspecting, classes and attributes
//exchange button class with 'player-bar-btn' otherwise it looks
//weird, try yourself to see
//insert link of real button
     btn.setAttribute("data-station-url", "/player/station/tag/alternative+rock");
     btn.setAttribute("data-analytics-action", "StartStation");
     btn.setAttribute("data-analytics-label", "tag");
//grab the player element and put the created button first
     let controls = document.getElementsByClassName("media-controls")
     controls[0].insertBefore(liel, controls[0].childNodes[0]);

Windows Batch Sudoku Downloader

It’s surprising how often I need this…

IF [%1] == [/?] GOTO USAGE
IF [%1] == [/h] GOTO USAGE

ECHO Sudoku (killer difficulty) downloader, loads from
ECHO and assembles to single file, ready to be printed.
ECHO Dependencies are wget and pdftk, those need to be available on the PATH.
ECHO usage: sudoku [N] 
ECHO N - Number of Sudoku pages, default 20 if omitted


IF NOT %1==[] SET PAGES=%1

FOR /L %%N IN (1, 1, %PAGES%) DO (
	wget -q -O %%N.pdf ""
	ECHO Downloaded page %%N
ECHO Combining %PAGES% to a single PDF
pdftk *.pdf cat output sudoku.pdf
CALL sudoku.pdf
CD \


@PostConstruct not working?

If using Java11+ the javax.annotation package is no longer part of the distribution, as per JSR-175 missing annotations do not trigger “missing class” or similar exceptions.
So look out when updating from sub-Java11 to there. Solution? Add


Another gotcha is when using vaadin, it has it’s own CDI dependency:


Netbeans 10 (incubating) – 30 available Plugins?

Since the move to apache the included Netbeans plugin sources (“Update Centers) seriously lost it’s appeal.

To have access to the most basic needs, head to Tools->Plugins->Settings and Add:

  • enabling “Netbeans 8.2 Plugin Portal” yields 20 additional plugins
  • adding

    gets you 171 (26 shared with “Plugin Portal)

  • adding

    will add 170 (12 shared with “Plugin Portal”, 69 shared with the 8.2 above)

In total 271, much better. Whether all of them are useful or even work is another question entirely. “Quick Opener” did, so I’m happy for now.

Btw, did anyone else notice that the windows executable properties have still version 9 listed?


Netbeans 10 – Cannot find Java 1.8 or higher

Freshly unpacked Netbeans 10 won’t run with either JDK 8 or 11 in PATH and JAVA_HOME.

Solution, either:

  • run netbeans with jdkhome parameter, pointing to your jdk-base folder, e.g.
    netbeans64 --jdkhome c:\jdks\jdk11
  • for a more permanent solution go to subfolder “etc” and open netbeans.conf search the line with netbeans_jdkhome and set the folder there (also uncomment/ remove hashsign) like so