20070729 Sunday July 29, 2007

Creating a self-signing certificate and signing a jar file.

To create a certificate that you can use to self-sign your JAR files, launch the keytool application (must be in your path):

keytool -genkey -alias <YOUR_ALIAS> -keystore <YOUR_KEYSTORE_NAME>.keystore

<YOUR_ALIAS> and <YOUR_KEYSTORE_NAME> can be anything you want, just don't forget them. When you run the tool, it will ask your your name, organization, address, etc., as well as the keystore password. Once you answer those questions, it will create the keystore and certificate for you.

You can then sign a jar as follows:

jarsigner -keystore <YOUR_KEYSTORE_NAME>.keystore -storepass <YOUR_KEYSTORE_PASSWORD> <YOUR_JAR_FILE> <YOUR_ALIAS>

That should do it.

Posted by rickg ( Jul 29 2007, 11:50:05 PM PDT ) Permalink Comments [0]
20070727 Friday July 27, 2007

Installing Linux headers for VMware Tools

Installed CentOS 5 on a new VM today, then tried installing vmware tools. Got all the way up to running vmware-config-tools.pl, then ran into the dreaded "What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include] " prompt. Of course, /usr/src/linux/include did not exist.

I've done this dozens of times, but always forget the easy way to get the linux headers, so this time after spending another 20 minutes Googling for the answer, I am finally writing it down.

1. Install Yum Utilities from the Add/Remove Software menu item. It is under CentOS Extras.

2. Run the following commands:

yum install gcc g++
yum install kernel-devel

Now you can run vmware-config-tools.pl.

UPDATE:

After running vmware-config-tools.pl, I rebooted to find that my X server would not load. It eventually reported the following problem:

Undefined Monitor "vmware" ...

I was able fix the problem by editing /etc/X11.xorg.conf and adding the following lines:

Section "Monitor"
        Identifier   "vmware"
EndSection

Found the solution here.

Posted by rickg ( Jul 27 2007, 07:16:18 AM PDT ) Permalink Comments [1]