I first saw this in 1.3 but am now playing with 1.4 (
We have some classes that care called 'core.blah....', but
the project team was forced to rename the top-level directory from
'core' to 'corecode' since the gate folks didn't believe in having
a directory called 'core' (which I agree with). So the build puts
a symlink in place. Unfortunately it seems like java uses realpath
to resolve the link, then knows that it's 'corecode' and doesn't go
recompile any files under there.
For example:
{root:yavin:19} /tmp/k
+ /usr/j2se/bin/javac -nowarn -classpath /builds/on-fixes/usr/src/lib/smartcard:/builds/on-fixes/usr/src/lib/smartcard/comm/javax.comm/java:/usr/share/lib/ami/ami.jar:/builds/on-fixes/usr/src/lib/ami/jarami:/builds/on-fixes/usr/src/lib/smartcard/jarsc:/builds/on-fixes/usr/src/lib/smartcard/classes:/usr/share/lib/smartcard/smartos.jar -d /builds/on-fixes/usr/src/lib/smartcard/classes CTListener.java
CTListener.java:47: package opencard.core.terminal does not exist
import opencard.core.terminal.CardTerminalException;
^
CTListener.java:60: cannot resolve symbol
symbol : class CardTerminalEvent
location: interface opencard.core.event.CTListener
public abstract void cardInserted(CardTerminalEvent ctEvent)
^
CTListener.java:61: cannot resolve symbol
symbol : class CardTerminalException
location: interface opencard.core.event.CTListener
throws CardTerminalException;
^
CTListener.java:64: cannot resolve symbol
symbol : class CardTerminalEvent
location: interface opencard.core.event.CTListener
public abstract void cardRemoved(CardTerminalEvent ctEvent)
^
CTListener.java:65: cannot resolve symbol
symbol : class CardTerminalException
location: interface opencard.core.event.CTListener
throws CardTerminalException;
^
5 errors
Note the 'core' bit.
There is a 'core' in the classpath, but it's a link:{root:yavin:27} pwd
/builds/on-fixes/usr/src/lib/smartcard/opencard
{root:yavin:28} ls -l core
lrwxrwxrwx 1 root other 56 Mar 1 13:44 core -> /builds/on-fixes/usr/src/lib/smartcard/opencard/corecode/
It fails to compile because it doesn't go recompile CardTerminalEvent.java
like it used to. If I change opencard.core.event to opencard.corecode.event
it works, but I can't do that because this is code from outside (I think),
and it's a _lot_ of change. I can also rename corecode back to core, and
it works, but that may irritate people (plus I think this is a real java
bug anyway).
I see this from truss:
89715/7: resolvepath("/builds/on-fixes/usr/src/lib/smartcard/opencard/core/event", "/builds/on-fixes/usr/src/lib/smartcard/opencard/corecode/event", 1024)
= 62
which I don't see from java 1.2.
In case it helps, but I see it with 1.3.0 in Solaris 9 as well:
{mike_s:yavin:98} /usr/j2se/bin/java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b53)
Java HotSpot(TM) Client VM (build 1.4beta-B53, mixed mode)
- duplicates
-
JDK-4266026 javac no longer follows symlinks
-
- Closed
-