开发者

Force java applet to run in 32-bit instead of 64-bit JRE

开发者 https://www.devze.com 2023-04-11 19:16 出处:网络
I have a Java applet, designed under 32-bit JDK (1.5). When deploying it on a new MacOS (10.7) it runs incorrectly - because 64-bit JRE is preferred by default in this system (there are two for choose

I have a Java applet, designed under 32-bit JDK (1.5). When deploying it on a new MacOS (10.7) it runs incorrectly - because 64-bit JRE is preferred by default in this system (there are two for choose, 32 and 64 bit). If preferred order is changed to 32-bit first, everything is OK - but that's not a solution, because changing settings on a client machine is inconvenient. For a standalone application bundle it could be fixed with proper settings in info.plist, just specifying app architecture.

So, is there a way to make a same thing when launching applet - to specify i386 architecture, force browser to run 32-bit JRE, force JVM to work in 32 bit, or anything开发者_StackOverflow社区?

For now I found only how to specify JRE version/family for the applet, it doesn't help. I'm trying to launch an applet using the code like:

<object
classid="clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA"
width="740" height="400"
codetype = "application/x-java-applet;version=1.5"
>
<param name="code" value = "ca/lcsi/Program/App/LogoFrameApplet.class"> 
<param name="archive" value="webplayer.jar">
<param name="project" value="testpath.tsfp"> 
<param name="lang" value="en">
    <embed 
    type="application/x-java-applet;version=1.5" 
    code="ca/lcsi/Program/App/LogoFrameApplet.class"
    archive = "webplayer.jar"
    project = "testpath.tsfp"
    lang = "en"
    width="740" height="400"
    >
</object>

Would appreciate the proposals!


So, the problem is kind of solved, if anyone is interested.

For an applet it's impossible. It is possible to launch JVM in 32-bit mode with the use of Java Web Start. But with current (Java SE 6) implementation, JWS is less convenient than applets, because of an absolute 'codebase' field in config file, which limits the deployment of an applet/application.

It seems that problem is in JRE implementation - my program really has very limited system-specific parts, and no part that depend of bitness. Would continue testing, to localise a problem for a bug report :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号