Recreate JAR Created By wsimport -clientjar

For some reason, JARS created by wsimport -clientjar can’t be read properly. We have trouble finding our classes when using these JARs.

wsimport -clientjar output.jar input.wsdl 

Our workaround is to use a Windows batch file with the following contents to recreate the JAR file, using the jar.exe utility.

@echo off
mkdir ~jar
cd ~jar
jar -xf ..\%1
jar -cf ..\%1 *
cd ..
rmdir /S /Q ~jar 

We named our batch file recrate-jar.bat can call it like this.

 recreate-jar.bat output.jar 

Run Static Files Locally Using Node.js

1. Install Node.js if you don’t have it already.

2. Install node-static.

> npm install -g node-static

3. Create a sample index.html you would like to serve.

4. Run static on the index.html directory.

> static
serving "." at

5. Open in your favorite browser.

How to Access Linux PostgreSQL Remotely

1. Login to your Linux box as user postgres.

> su postgres

2. If needed, create the user that needs remote access.

> createuser -W

3. Edit the PostgreSQL pg_hba.conf file. In our system, it’s under /var/lib/pgsql/data/.

> vi /var/lib/pgsql/data/pg_hba.conf

4. Append the following lines to pg_hba.conf. In this example, we are allowing remote access to all databases for user MYUSER with a CIDR mask.

host all MYUSER md5

5. Edit postgresql.conf and change the listen_addresses property.

> vi /var/lib/pgsql/data/postgresql.conf

6. Reload PostgreSQL for the changes to take effect. Here we are using the data directory /var/lib/pgsql/data.

> pg_ctl reload -D /var/lib/pgsql/data

7. Connect remotely to PostgreSQL using your favorite client, like pgAdmin III.