Wednesday, September 12, 2007

Changing ECLIPSE workspace JRE and Java compiler setting

I wanted to upgrade my ECLIPSE workspace to use Java 5 by default rather than Java 1.4.2. I changed my JAVA_HOME and JDK_HOME env vars but that didn't help. When creating a new project, ECLIPSE continued to pick up the 1.4.2 JRE as seen under Project...Properties. The JRE preference seems to be at the workspace not project level. To change the JRI, Window...Preferences. Open up the tree under 'Java'. Choose "Installed JREs". If there's only one there, you can't remove it. Click 'Add...'. Browse to the base directory of the Java installation, e.g. /usr/java/jdk1.5.0_08. Give the JRE a name and click OK. This adds the new JRE to the list of JREs available. To select it as the default JRE, it must be checked in the Installed JREs window.

But that's not all. I still couldn't add statements that used the new enum type even after doing all the above. In addition, one must make a change to the workspace for the compiler: Window...Preferences. Click on 'Compiler' - don't expand the tree. On the page in left pane, change the Compiler compliance level to 5.0.
I'm not sure, but I assume that the '5.0' choice wouldn't have even been there if I had not changed my JDK_HOME and JAVA_HOME env vars already.

Cantata nightly build and approuter build

Occurs on dart.research.att.com. Java 1.4.2 build occurs under uid, bbcbuild while Java 1.5.0 build occurs under uid, cantatabuild.

Java 1.4.2 Build
Checks out cantatabuild module under HEAD/cantatasrc
then,
$ ant all
in HEAD/cantatasrc/build

Java 1.5.0 Build
Checks out cantatabuild module under HEAD_java5 /cantatasrc
then,
$ ant all
in HEAD/cantatasrc/build

The fetch target checks out the various modules including EChartsCPL and SipServletAppRouter.
The compile target builds all the modules. To build just the SipServletAppRouter module,
From top level directory (one above SipServletAppRouter),
$ cvs co cantatabuild
$ cd build
$ ant copy-servlet-jarsBuildfile: build.xml

copy-servlet-jars:
[copy] Copying 1 file to /home/khp/Projects/CantataApps/lib
[copy] Copying 1 file to /home/khp/Projects/SipServletAppRouter/lib
[copy] Copying 1 file to /home/khp/Projects/CantataApps/lib
[copy] Copying 1 file to /home/khp/Projects/SipServletAppRouter/lib

BUILD SUCCESSFUL
Total time: 0 seconds

This copies both sipservlet.jar and servlet.jar to SipServletAppRouter/lib directory.

However, while this allows ant to resolve the dependencies needed for the SipServletAppRouter build, it does not, by default, enable ECLIPSE to do the same. However, an ECLIPSE project can be created from an ant build file. You'll see this option when using File...New...Project in ECLIPSE. However, Tom believes that external changes to the build.xml file will not be automatically incorporated into the ECLIPSE project.

Monday, September 10, 2007

Jensen MySQL

$ mysql -u root -p
Enter password: su.......

Using tutorial at:
http://dev.mysql.com/doc/refman/5.0/en/tutorial.html

For facebook example 4 app (display counter):
mysql> create database menagerie; /* this was name of database in above tutorial */
mysql> use menagerie;
mysql> show tables;
Empty set (0.00 sec)

mysql> create table counter (count INT);
Query OK, 0 rows affected (0.06 sec)

Friday, September 7, 2007

Dell Ubuntu vs. Build it Yourself

Now that Dell will sell you a Desktop machine with Linux, I was curious if one could still build a machine oneself cheaper than buying one from a vendor like Dell. Heretofore, I maintained that building one was always cheaper primarily because the vendor was paying Microsoft for the Windows license. When the intended OS is Linux, this is throwing money away and contributing to the evil empire.

I first configured a basic Dell Inspiron 530N:
PROCESSORIntel®Pentium® dual-core processor E2140 (1MB L2,1.60GHz,800 FSB)edit
OPERATING SYSTEMUbuntu Desktop Edition version 7.04edit
MONITORSNo Monitoredit
MEMORY1GB Dual Channel DDR2 SDRAM at 667MHz- 2DIMMsedit
HARD DRIVE160GB Serial ATA Hard Drive (7200RPM) w/DataBurst Cache™edit
OPTICAL DRIVE48X CD-RW/ DVD Combo Driveedit
VIDEO CARD128MB NVIDIA GeForce 8300GSedit
SOUND CARDIntegrated 7.1 Channel Audioedit
KEYBOARD & MOUSEDell USB Keyboard and Dell Optical USB Mouseedit
FLOPPY & MEDIA READERNo Floppy Drive Included

Total cost: $379

Then I went over to newegg.com and chose the cheapest components I could find that matched the above. I did this even when the user reviews were somewhat bad and would've caused me to buy something more expensive.

Here's what I came up with:


Linkworld 3210-04-C2628 Black/ Silver Steel ATX Mid Tower Computer Case - Retail
Item #: N82E16811164040
Return Policy: Standard Return Policy


$27.99

Maxtor STM3160215AS 160GB 7200 RPM SATA 3.0Gb/s Hard Drive - OEM
Item #: N82E16822144454
Return Policy: Limited 30-Day Return Policy


$46.99

PNY VCG8400SXPB GeForce 8400GS 256MB 64-bit GDDR2 PCI Express x16 HDCP Ready Video Card - Retail
Item #: N82E16814133203
Return Policy: Limited 30-Day Return Policy

$10.00 Mail-in Rebate
$69.99

LG Black IDE DVD-ROM Drive Model GDR-H30NK - OEM
Item #: N82E16827136126
Return Policy: Standard Return Policy


$17.99

Crucial Ballistix 1GB 240-Pin DDR2 SDRAM DDR2 667 (PC2 5300) Desktop Memory Model BL12864AA663 - OEM
Item #: N82E16820146558
Return Policy: Memory (Modules, USB) Return Policy


$51.99

ECS 945GCT-M (V1.0) LGA 775 Intel 945GC Micro ATX Intel Motherboard - Retail
Item #: N82E16813135051
Return Policy: Standard Return Policy

-$5.00 Instant
$10.00 Mail-in Rebate
$54.99
$49.99

Intel Dual-Core E2140 Allendale 1.6GHz LGA 775 Processor Model BX80557E2140 - Retail
Item #: N82E16819116037
Return Policy: Processors (CPUs) Return Policy


$75.99
Subtotal: $340.93


Total Cost: $340.93

I disregarded taxes and shipping because I believe they would be comparable. So the Dell is $40 more. Bear in mind that the Dell comes with a keyboard and mouse and a 1 year warranty.

So, what's my new take on this: Only build yourself if you already have some number of components lying around and can save money by not buying everything.

Thursday, September 6, 2007

Fighting NATs and firewalls

Trying to get apache and PHP5 up on home machine to host some baby facebook applications. packard runs Fedora Core 3 which has PHP4 - too old, too hard to update. Jensen is running Fedora Core 5 which has PHP 5.1 - start there. In meantime, work on bringing up CentOS 4.5 on edsel. Then use yum to update its PHP 4 to PHP 5.1 as follows:
yum --enablerepos=centosplus update php*. Still need to bring up mysql on edsel.

After much strife, got "Hal's Test Application 1" to work. FIOS seems to block port 80 so I'm running on port 5080 on digimojo.dyndns.org. Gotta love dyndns.

Monday, July 9, 2007

1990 Accord Appraisal

According to edmunds.com, average condition, 104,000 miles, light blue, automatic transmission: $1170. I used 'average' condition this time because of new dent in hood.

Friday, July 6, 2007

1996 BMW 318ti Maintenance

Records from Mike Yang are incomplete according to him.

DATE
Mileage
Cost ($)
Description
1/29/99
32,128
177.37
Oil and filter change, 4 wheel alignment, wiper insert replacement, replacement idle control valve (warranty), replace both O2 sensors (warranty); Work peformed at JMK, Route 22 East
7/13/00
44,047
75.61
Replace window regulator clips (warranty), oil and filter change, wiper insert replacement, replace C/S molding on outside of car, Work @ JMK
9/15/00
44,546
1647.00
Repair body from collision with deer: replace bumper cover, lic. bracket, grille, RT headlamp housing, air baffles, pull nose straight ($500 deductible); Work @ JMK
10/4/01
56,234
558.73
60K general maintenance: oil and filter change, wiper insert replacement, w/w fluid, replace air cleaner, replace micro filter, service rear differential, replace battery, replace fan and V-belts; Work @ JMK
6/6/03
73,092
367.86
oil and filter change, replace front brake pads, sensors and rotors; Work @ JMK
10/30/03
77,164
417.12
mount, balance four P185/65 HR15 Bridgestone Potenza (POZ) tires, replace valve stems, dispose of old tires; Work at McLaughlin's Auto & Tire Center, Berkeley Heights, NJ, tires purchased at Tire Rack, South Bend, IN
5/21/04
83,000
55.22
oil and filter change
5/21/04
83,000
16.63
emblem purchased
5/2/05
92,211
303.21
Replace rear rotors, sensors, pads, oil and filter change; Work at Gogel Tire Company, East Hanover, NJ
5/3/05
92,291
113.59
Flush brake fluid, lubricate steering wheel; Recommendations: 90K maintenance, power steering pump, instrument cluster bulb, bumper scrapes, windshield crack, scratches on passenger side quarter panel, trunk, driver's door, passenger side front bumper cover missing (?); Work at Rolf's, Summit NJ
1/17/07
107,280
339.80
Mount and balance four new BF Goodrich P185/65R15 88T tires, 70,000 mile warranty, replace rubber valve stem
6/6/07
108,145
0.00
Ownership transfer to Hal Purdy from Ping-Fai Yang
6/11/07
108,155
216.24
Diagnose CEL and Transmission Fault lights - found engine light on due to load measurement fault (154) and a throttle position fault (117), trans light on due to TPS fault (154). Test TPS and found voltage readings incorrect. Remove and replace Throttle Position Sensor, clean air cleaner box of insulation debris, clear computer of all fulat codes; (Eurosport of Westfield, Westfield NJ)
7/7/07
108,282
2.00
Inspect front brakes - rotors good, pads at 4mm; Inspect rear brakes - rotors good though not all rust gone yet, bleed both rear calipers with new DOT 4 brake fluid; Diagnose w/w fluid problem with right side nozzle - nozzle broken where plastic inlet tube joins nozzle; Inspect power steering pump - signs of slight leak on hose - wipe clean for future examination (khp)