NetRexx and HP-UX 10.20

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NetRexx and HP-UX 10.20

Marko.Stenvik

     Hi

I tested Tablet.class (comes with Nettrexx zip) with Netscape 4.x on a
HP-UX 10.20 platform. The applett works nicely when I am in the console,
but when I get the Netscape to my Xserver it will turn all black. It still
works though.
What could cause the problem?

What is the right Java package to run stand alone NetRexx apps (without
Netscape) on HP-UX 10.20 and how to set the environment up?

Marko

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx and HP-UX 10.20

Massimiliano Marsiglietti
Ciao,

In <"165306:1*"@MHS>, on 10/01/97
   at 08:36 AM, [hidden email] said:


>What is the right Java package to run stand alone NetRexx apps (without
>Netscape) on HP-UX 10.20 and how to set the environment up?

While I can't comment directly for HP-UX, I suppose it shouldn't be much
different from Linux, which sometimes I use to test and code my programs.

So, what did I do to make NetRexx run?

First, I copied nrtools.zip (found in the original netrexx.zip package)
into /usr/local/jdk1.1.3 (the base dir for the JDK in my machine) and then
unzipped  it. It created, among the other things, the files:

NetRexxC.zip and NetRexxR.zip in /usr/local/jdk1.1.3/lib
nrc.bat and nrc.cmd in /usr/local/jdk1.1.3/bin

I edited nrc.bat to make it a bash script (adding some things I need with
my setup) and renamed to 'nrc'. A very simple version of it can be the
following:

java -ms4M COM.ibm.netrexx.process.NetRexxC $1 $2 $3 $4 $5 $6 $7 2>

(That is, a file composed by only one line )
I edited the bash script 'java' (which is only a symbolic link to
'.java_wrapper', by the way) which is present into /usr/local/jdk1.1.3/bin
to add NetRexxC.zip to the  CLASSPATH global environment variable; that
section looks like this:

CLASSPATH="${CLASSPATH-.}"
if [ -z "${CLASSPATH}" ] ; then
    CLASSPATH=".:$JAVA_HOME/classes:$JAVA_HOME/lib/classes.jar:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/i18n.jar:$JAVA_HOME/lib/classes.zip:$JAVA_HOME/lib/NetRexxC.zip"
else
    CLASSPATH=".:$CLASSPATH:$JAVA_HOME/classes:$JAVA_HOME/lib/classes.jar:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/i18n.jar:$JAVA_HOME/lib/classes.zip:$JAVA_HOME/lib/NetRexxC.zip"
fi
export CLASSPATH

Now, you should be able to type 'nrc' at the command prompt and get the
usual NetRexx compilation screen.

As for which libs to ship with your program, the easy answer is
NetRexxR.zip.  Everything needed by your NetRexx programs is there. OTOH,
if you don't use  some features you can leave out some files and repackage
your own  MyNetRexxR.zip, which would be slimmer. NetRexxR.zip, as of the
1.120 release, is a mere 68k bytes, so if you are shipping an application
which is bigger, expecially if it doesn't have to run on the internet,
don't waste your time and put in the whole  NetRexxR.zip.

--
Max Marsiglietti,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

RE: NetRexx and HP-UX 10.20

Patrick McPhee-3
In reply to this post by Marko.Stenvik
[hidden email] (Max Marsiglietti) wrote

> First, I copied nrtools.zip (found in the original netrexx.zip
> package)
> into /usr/local/jdk1.1.3 (the base dir for the JDK in my machine) and
> then
> unzipped  it.
>
This is equivalent to the normal instructions for installing under OS/2
and NT, but I don't like the idea of sticking things into the java tree.
I think you're better off sticking all the NetRexx stuff somewhere else,
so you can replace your java tree without affecting NetRexx, and
vice-versa. Just my opinion.

> I edited nrc.bat to make it a bash script (adding some things I need
> with
> my setup) and renamed to 'nrc'. A very simple version of it can be the
> following:
>
> java -ms4M COM.ibm.netrexx.process.NetRexxC $1 $2 $3 $4 $5 $6 $7 2>
>
Bourne and Korn shell, and I assume bash, provide `$*', which means `all
the arguments', so you can have
  java -ms4M COM.ibm.netrexx.process.NetRexxC $*

> I edited the bash script 'java' (which is only a symbolic link to
> '.java_wrapper', by the way) which is present into
> /usr/local/jdk1.1.3/bin
>
I also think this is a bad idea, and it's not necessary, either. If you
set CLASSPATH, eg in your nrc script, so that it includes NetRexxC.zip:
 #!/bin/ksh
 export CLASSPATH=/usr/local/netrexx/lib/NetRexxC.zip:${CLASSPATH-.}
 java -ms4M COM.ibm.netrexx.process.NetRexxC $*

java will prepend whatever you've put in CLASSPATH to its standard path.

> if you don't use  some features you can leave out some files and
> repackage
> your own  MyNetRexxR.zip, which would be slimmer.
>
I feel like such a downer. I wouldn't recommend this either.
Distributing other people's libraries is always problematic, but it gets
really bad when you start repackaging them. In my opinion, if you ship
NetRexxR.zip, you should ship it exactly as delivered by M Cowlishaw,
and be prepared to update your distribution whenever a new version of
NetRexx is released.

For what it's worth, here's a korn shell script which does much the same
thing as NetRexxC.cmd:
#!/bin/ksh

# Translate and compile a NetRexx program

#

# use as:
NetRexxC hello [file2]...

#

#   which will use the NetRexx translator
to

#     translate hello.nrx to hello.java

#   then will use javac to
compile hello.java

#

# Any OPTIONS keywords, indicated by a prefix
'-',

# may be added before, after, or between file

# specification(s),
along with the following extra

#flags:

#

#   -run       = run class
after compilation

#   -keep      = keep the java file after successful

#
compilation (as xxx.java.keep)

#   -nocompile = only translate, do not
compile

#

# Multiple programs may be specified; in this case

# they are
all run (if requested) after all compiles.

#

# ----------

# 1996.09.02
-- handle Warnings from NetRexxC (rc=1)

# 1996.11.12 -- use NETREXX_HOME
environment variable

# 1996.12.14 -- use COM.ibm.netrexx.process

#
1997.10.01 -- Korn shell version of script by P
McPhee



args=''

run=0

noc=0

for arg in $@; do

  case $arg in

    -run)
run=1 ;;

    -nocompile) noc=1 ; args=$args' -nocompile' ;;

    *)
args=$args' '$arg ;;

  esac

done



java -ms4M
COM.ibm.netrexx.process.NetRexxC $args



if [ $run = 1 ]

then

  if [ $noc
= 1 ]

  then

     echo 'Run option ignored as -nocompile specified'


else

    for file in $args; do

      if [ $file != "-*" ]

      then


# there's probably a better way to do this...

        fn=`basename $file
.nrx`



        # The original rexx script determined the case of the
actual class

        # taking advantage of the OS/2 filesystem's case
independence

        # I'll just hope the .nrx file had the right case


echo 'Running' $fn '...'

        java $fn

      fi

    done


fi

fi



exit $?




--
Patrick TJ McPhee
DataMirror Corporation
[hidden email]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

RE: NetRexx and HP-UX 10.20

Patrick McPhee-3
In reply to this post by Marko.Stenvik
It seems like Exchange folded the lines of the ksh version of NetRexxC I
sent around yesterday, so I'll try again, including it as an attachment
this time. I hope this is useful for someone.


 


--
Patrick TJ McPhee
DataMirror Corporation
[hidden email]


NetRexxC (1K) Download Attachment