NPWJ

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
SEE ALSO

Nokia nmake 15 NPWJ(1)

NAME

npwj − run Java commands given UNIX® pathnames

SYNOPSIS

npwj java_command [ parameters ]

DESCRIPTION

npwj (native path wrapper for Java) converts UNIX® format pathnames to Windows® format pathnames and calls the specified Java command with the converted pathnames. It is intended for use on a Windows host, and provides a convenient way to call Windows based Java commands from an environment using UNIX pathnames such as Interix or UWIN.

Nokia nmake calls npwj internally where appropriate; no special action or manual setup is required when using nmake’s built-in rules. This manual page describes npwj for standalone use outside of nmake.

npwj does the following:

1.

Identifies the parameters that contain one or more UNIX absolute pathnames.

2.

Converts UNIX absolute pathnames to Windows equivalents (relative pathnames are not changed).

3.

Compiles a new command line, which begins with java_command and contains the converted Windows pathnames in parameters.

4.

Executes the new command line.

A parameter may contain a single pathname or a set of pathnames separated by ‘:’. A set of pathnames is first converted to a pathname array. For each UNIX absolute pathname, npwj calls the appropriate function (unixpath2win() in the case of Interix, uwin_path() in the case of UWIN) to convert the UNIX pathname to the corresponding Windows pathname. When a set of paths is re-constructed, ‘;’ replaces ‘:’ as the path separator character. Since ‘;’ is a special character in the UNIX environment, it is re-written as ‘\;’. Another special character ‘$’, which is often used in Java class filenames, is also re-written as ‘\$’.

npwj can be used for all Java commands including java(1), javac(1), jar(1) and jdeps.

EXAMPLES

Here is a simple example using ksh(1) on a UWIN platform:

$ npwj javac ~/tmp/a.java

Since javac is a Windows-based command, attempting to directly pass a UNIX style pathname would have resulted in an error:

$ javac ~/tmp/a.java
error: cannot read: /home/na01/gms/tmp/a.java
1 error

A ksh alias may be used to make javac invocation more convenient for interactive use:

$ alias jc=’npwj javac’
$ jc ~/tmp/a.java

SEE ALSO

JAVA(1), JAR(1), nmake(1)
nmake User’s Guide
nmake Reference Manual
nmake Web Site


nmake 15 June 2013 NPWJ(1)