Skip to content

Commit e64f1a6

Browse files
hansonrhansonr
authored andcommitted
should use
Thread.currentThread$().getThreadGroup$().秘html5Applet; not Thread.currentThread$().getName$(); to get a reference to the HTML5 applet
1 parent 14badb5 commit e64f1a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,8 +3046,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
30463046
J2S.getResourcePath = function(path, isJavaPath) {
30473047
if (!path || path.indexOf("https:/") != 0
30483048
&& path.indexOf("https:/") != 0 && path.indexOf("file:/") != 0) {
3049-
var applet = J2S._applets[Clazz.loadClass("java.lang.Thread").currentThread$()
3050-
.getName$()];
3049+
var applet = Thread.currentThread$().getThreadGroup$().秘html5Applet;
30513050
path = (!isJavaPath && applet.__Info.resourcePath || applet.__Info.j2sPath)
30523051
+ "/" + (path || "");
30533052
}

0 commit comments

Comments
 (0)