Maybe. I'm not a lawyer, let alone an IP lawyer, but Netscape creating a programming language called "JavaScript" seems like the kind of thing that would be likely to cause confusion in the marketplace. Netscape explicitly chose the name to latch on to the popularity of Java at the time. It doesn't seem unreasonable to me for the Sun of 1997 to want to protect their interest in the Java name by licensing it to Netscape but controlling the underlying trademark.