This site requires JavaScript, please enable it in your browser!
Greenfoot back
Busch2207
Busch2207 wrote ...

2017/12/6

ERROR: Class java.awt.Rectangle was not found

Busch2207 Busch2207

2017/12/6

#
Hi! I wanted to play my game 'Adventure' (http://www.greenfoot.org/scenarios/5862) in the web-browser, but there occures an error:
The attempted translation produced the following diagnostic messages: INFO: Building JavaScript file INFO: Output file built with errors ERROR: Class java.awt.Rectangle was not found at HeroKnight$TrajectoryExtra.updateImage(HeroKnight.java:1015) at HeroKnight$T
The code compiles in the greenfoot-application (I have the latest version Greenfot 3.1.0). What can I do to fix this?
davmac davmac

2017/12/6

#
What can I do to fix this?
You would need to avoid use of the java.awt.Rectangle class, and any other AWT classes. AWT and Swing classes are not available in Greenfoot's HTML5 environment.
Busch2207 Busch2207

2017/12/9

#
Oh, well... That's terrible, because I'm using the BufferedImage and other awt-classes a lot in my projects for some special Image-Manipulations like darkness- and light-effects... But thank you anyway! Then this scenarios are damned not to work. Do you think, this will be fixed somewhen? Or is there a security-issue?
Yehuda Yehuda

2017/12/10

#
You can still run the scenarios, just not in HTML 5 version. If you press View legacy version (requires Java plugin) in the yellow window by the scenario it will take you to the regular applet that all scenarios used to use. (The day I posted a comment on your scenario I was running it, but the UserInfo wasn't working, though that could be a problem by me.)
Busch2207 Busch2207

2017/12/13

#
Yehuda wrote...
If you press View legacy version (requires Java plugin)
If I press this, then I get: Your browser is ignoring the <APPLET> tag. HTML5 version not available | Scenario not running? ... :/
danpost danpost

2017/12/13

#
Busch2207 wrote...
I get: Your browser is ignoring the <APPLET> tag.
The legacy version requires the java plug-in. IE will probably run the legacy version.
Yehuda Yehuda

2017/12/13

#
The same way it used to only work on certain browsers and only if you allow it (in java control panel).
You need to login to post a reply.