0

I was trying to run JHotDraw 7.0.6 but I got this error. How can I solve this?

Information:java: Errors occurred while compiling module 'JHotDraw 7.0.6'
Information:javac 1.8.0_242 was used to compile java sources
Information:2/19/20, 11:36 AM - Compilation completed with 14 errors and 10 warnings in 4s 986ms
/project/path/JHotDraw 7.0.6/src/org/jhotdraw/samples/draw/DrawLiveConnectApplet.java
Error:(31, 1) java: package netscape.javascript does not exist
Error:(125, 21) java: cannot find symbol
  symbol: class JSObject
Error:(125, 36) java: cannot find symbol
  symbol: variable JSObject
Error:(251, 13) java: cannot find symbol
  symbol:   class JSObject
  location: class org.jhotdraw.samples.draw.DrawLiveConnectApplet
Error:(251, 28) java: cannot find symbol
  symbol:   variable JSObject
  location: class org.jhotdraw.samples.draw.DrawLiveConnectApplet

I looked into this https://www.thecodingforums.com/threads/package-netscape-javascript-does-not-exist.140950/ and this Since today, I cannot access netscape.javascript.* classes within Eclipse but they did not help me much!

x7R5fQ
  • 949
  • 2
  • 13
  • 27
  • Travel back in time to when Applets were supported. About [four years ago](https://www.i-programmer.info/news/80-java/9391-oracle-annouces-the-end-of-java-applet-support.html) Oracle announced support was ending, but it was pretty much moot then anyway (because the browsers had started blocking it). So I would guess you want a browser that's about ten years old. So time machine. – Elliott Frisch Feb 19 '20 at 17:56
  • I am not quite getting what you are saying but I am trying to run the program in IntelliJ not in a browser. Can you elaborate more, in a simpler way, on what you were saying? please! – x7R5fQ Feb 19 '20 at 18:01
  • *I am trying to run the program in IntelliJ not in a browser* `netscape.javascript` [Netscape](https://en.wikipedia.org/wiki/Netscape) ***was*** a browser (a very ***early*** browser). That package was for Applet / Browser integration, and was adopted (because it was first) by **all** browsers (well, I guess the Applet plug-in was). Regardless, it's a distinction that hardly matters now, Applets are **dead**. – Elliott Frisch Feb 19 '20 at 18:03
  • See also [Invoking JavaScript Code From an Applet](https://docs.oracle.com/javase/tutorial/deployment/applet/invokingJavaScriptFromApplet.html) and the [`netscape.JSObject` Javadoc](https://docs.oracle.com/en/java/javase/12/docs/api/jdk.jsobject/netscape/javascript/JSObject.html). – Elliott Frisch Feb 19 '20 at 18:06

0 Answers0