[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl of Wisdom


I'm not sure this will work.  I haven't looked, but doesn't XWPE perform 
the compilation from the working directory for the file, i.e. the directory 
the file is in?  To have Javac perform correctly (if you are writing good 
Java code...  you are, aren't you?  :) ), you have to execute it from the 
top of the package hierarchy.  For example, suppose the fine folks at sun 
decided to use XWPE to edit the java.net package.  The "Socket" file would 
look like this:

package java.net;

import java.io.*;

public abstract class Socket
  //... Much stuff...

The file would be in:


To compile this with javac, you must execute javac from:

~/project> javac java.net.*;

I think this will only work for java classes which aren't in 
packages...  which if you're writing real java could, you really shouldn't 

I also believe in namespaces.

Ah, well, commence flaming...  (I don't know Perl, so if I missed 
something, just a little charring to the left please?)


At 09:54 PM 10/20/99 -0400, Dennis Payne wrote:
>Armin Voetter <e9426165@student.tuwien.ac.at> sent the following message
>unfortunately it bounced since the email address used wasn't the one
>he is subscribed with.
>Forwarded message:
>if u have perl try this:
>a little script (dont forget chmod a+x javacXWPE and edit the pathname)
>written in perl should remove the unwanted -c and -o blahblah.o (java
>rap, change javac to whatever for other compilers)
>Filename javacXWPE:
># Hint: filenames like "-o" or "-c" would also be refused by javac
>my $Command;
>foreach (@ARGV) {
>         unless (/^\-o$/ || /^\-c$/) {
>                 $Command .= $_ . " ";
>         }
>         @ARGV=0 if (/^\-o$/);
>exec "/opt/jdk/bin/javac $Command";
>add javacXWPE instead of javac to the compilers

IMPORTANT: The below information has changed!  Please use the
email addresses below to contact me.
Kenneth W. Flynn              | flynnk@astro.umd.edu
Graduate Fellow, Astronomy    | flynn@nrl.itd.navy.mil
UMD (College Park)            | And 10 or so others...