[2298] in java-interest

home help back first fref pref prev next nref lref last post

Re: [Q] - "javac: invalid atgument: noclobber"

daemon@ATHENA.MIT.EDU (Stephen Harris)
Thu Sep 28 09:27:33 1995

From: sweh@mpn.com (Stephen Harris)
To: jean@cs.columbia.edu (Hyae-Jin Oh)
Date: Thu, 28 Sep 1995 12:02:48 +0100 (BST)
Cc: java-interest@java.sun.com
In-Reply-To: <CMM.0.90.2.812209521.jean@ground.cs.columbia.edu> from "Hyae-Jin Oh" at Sep 27, 95 09:45:21 am

> 
> $ javac HelloWorld.java
> javac: invalid argument: noclobber
> 
> i'm sure i put HelloWorld.java file into "classes" directory.
> what am i missing here?

This is a problem Sun haven't learnt about yet, and is around in LOTS
of Sun programs :-(  It just hit me in the CDE install script :-(

You are using ksh as your shell, and you have $ENV pointing to a file
that has 'set -o noclobber' (or similar setup).  Now the javac script begins
  #!/usr/bin/ksh
which will run your $ENV file, and when it tries to overwrite a file it will
fail miserably.

Solutions:
1) Put a -p flag on the first line of the script
   I write ALL my scripts this way.  It tells ksh to use /etc/suid_profile
   instead of $ENV - suid_profile (if it exists!) is generally a lot lot
   cleaner and won't have these problems.

2) remove the offending line from the $ENV file

3) Modify the wrapper and add 'set -o clobber'

4) Write a wrapper to unset ENV and call the java script wrapper

-- 

rgds,

Stephen
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post