Thursday, November 14, 2013

CVS, Eclipse and plink (putty)

CVS (1.12.13), Eclipse (Version: Juno Service Release 1), SunOS (5.10)  and plink (putty Release 0.63)

Sometimes getting Eclipse to work with CVS can be difficult. It took me a long time, but eventually I found a solution, which surprisingly worked. Basically, I set up plink to use ssh public key authentication authentication. I stored the public key in the authorized key file on the cvs server in my user's home directory: ~/.ssh folder.

The step were as follows:

First putty's puttygen utility was used to generate a key pair. In my case, I used a SSH2-DSA 2048 key, which looked as follows:


Then he contents from the textfield with the label "Public key for pasting into OpenSSH authorized_keys file:" were copied into the authorized_keys file in the ~/.ssh directory of the unix user who was used to access the CVS repository. The contents of the authorized_keys file looked like this:


In eclipse, the "Ext Connection Method" was configured as follows:


Notice that the "-i" parameter, which points to the file containing the private key generated above using puttygen. Here, in this example, the private key was NOT protected with a password when it was saved from puttygen; probably not a good idea.

Now in Eclipse, set up a CVS repository as follows:


Notice that the connection type is "ext" and that the user  and password are set. In my case, the password had no affect because I was using public key authentication and because my private key was not protected with a password. It could be that the password here might be used to access the private key, but I'm not really sure about it and didn't test it.

Another factor which might have an affect on the functioning of the above configuration and which has not be investigated because of time constraints is:

In the initialisation file of the unix user with which CVS was accessed, I set the path to the CVS client and added it to the working PATH as following:

export CVS_HOME=/opt/sfw/bin
export CVS_SERVER=${CVS_HOME}/cvs
export PATH=$PATH:$CVS_HOME

echo "CVS_SERVER=${CVS_SERVER}"








Friday, November 1, 2013

javafx ensemble with netbeans

When running the javafx (javafx-samples-2.2.45) Ensemble example on Windows with netbeans, it is possible that the following error with occur:

Your active platform is: default_platform, but the corresponding property "platforms.default_platform.home" is not found in the project's properties files. 
 Either open the project in the IDE and setup the Platform with the same name or add it manually.
 For example like this:
     ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.default_platform.home" in a .properties file)
  or ant -Dplatforms.default_platform.home=<path_to_JDK_home> jar (where no properties file is used)

To fix this, open the project.properties file in the nbproject subfolder of Ensemble project, which is contained in the above samples zip file.

native.bundling.enabled=false
platform.active=default_platform
platforms.default_platform.home=C:\\Program Files\\Java\\jdk1.7.0_25

Of course, the values will depend on  the location of your java installation.