Results 1 to 6 of 6
Thread: Macintosh Applet Quirkiness
- 05-13-2010, 03:09 AM #1
Member
- Join Date
- Feb 2010
- Location
- Ross Lunar Capsule 2571
- Posts
- 15
- Rep Power
- 0
Macintosh Applet Quirkiness
Hi. I have this rather annoying situation in a work project. All my systems are Linux, so naturally I want to compile under Linux using javac. But for some mysterious reason, if I compile under Linux, the resultant Java applet bytecode will not work when viewed in a web browser on a MacOS X system. (While working just fine when viewed on a Windows or Linux system.)
But if I take the same source code, and compile it using javac on a MacOS X system, the resultant Java applet byte code will work fine when viewed in a web browser on any OS.
So, why is it that bytecode must be compiled on a MacOSX system in order to be compatible with an OSX system? Besides not making any sense, it is a real pain because development code and production code have to be built on separate systems.
Many months ago I did some research into this problem, but I wasn't able to find any helpful explanations.
-
I don't do applets nor Mac coding, but I wonder: Do you compile at a compliance level of Java 1.5 or 1.6? I believe that mac supports 1.5 but not 1.6 (anyone -- please correct me if I'm wrong!).
- 05-18-2010, 01:34 AM #3
Member
- Join Date
- Feb 2010
- Location
- Ross Lunar Capsule 2571
- Posts
- 15
- Rep Power
- 0
You are correct, Mac systems (at least the ones at my workplace) only support 1.5. Unfortunately, this is not the problem. I did testing again today: the only way I can get the applets to display on a Mac is to compile them on a Mac, using the -source 5 switch. If I compile the same source code on a Linux box, the applet will not show up on the Macs, even with the -source 5 switch.
Unfortunately, the Java console on the Mac systems doesn't provide any information as to why to applet won't display -- all I see is a little red "X" where the applet is supposed to be in the browser. I tested with Firefox and with Safari -- no noticeable difference.
I also noticed during testing that the applet responds less reliable to mouse clicks when displayed on a Mac computer.
- 05-18-2010, 02:21 AM #4
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
Do you have an actual JDK installed on your Linux box? Many Linux distributions ship with gcj (Gnu Compiler for Java) as the Java dev and runtime environment. It's not necessarily a problem, but it's worth checking out whether you have a Sun JDK/JRE.
-Gary-
- 05-18-2010, 02:38 AM #5
Member
- Join Date
- Feb 2010
- Location
- Ross Lunar Capsule 2571
- Posts
- 15
- Rep Power
- 0
As far as I can tell, the Sun JDK/JRE are the only ones installed on my system, and I can't locate gcj anywhere on my system.
There doesn't seem to be a more specific javac switch. I am not sure how to find out exactly what "run-java-tool" is calling. Gentoo portage shows the sun Java JDK installed as I intended:Java Code:choward@voltron /rcdp/production/www $ whereis javac javac: /usr/bin/javac /opt/sun-jdk-1.6.0.20/bin/javac choward@voltron /rcdp/production/www $ ls -l /usr/bin/javac lrwxrwxrwx 1 root root 13 Apr 15 14:03 /usr/bin/javac -> run-java-tool choward@voltron /rcdp/production/www $ ls -l /usr/bin/run-java-tool -rwxr-xr-x 1 root root 1536 Jan 13 2009 /usr/bin/run-java-tool choward@voltron /rcdp/production/www $ java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) choward@voltron /rcdp/production/www $ javac -version javac 1.6.0_20
Java Code:voltron public_html # emerge --search sun-jdk Searching... [ Results for search key : sun-jdk ] [ Applications found : 1 ] * dev-java/sun-jdk Latest version available: 1.6.0.20 Latest version installed: 1.6.0.20 Size of files: 165,736 kB Homepage: http://java.sun.com/javase/6/ Description: Sun's Java SE Development Kit License: dlj-1.1
- 05-18-2010, 02:42 AM #6
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
Similar Threads
-
Pass parameter from one applet to another applet in different webpages...
By anubhavranjan in forum Java AppletsReplies: 2Last Post: 09-29-2009, 03:33 PM -
Calling another applet on click of button in one applet
By niteshwar.bhardwaj in forum Java 2DReplies: 1Last Post: 02-19-2009, 12:54 PM -
need applet help !
By fadiRU in forum Java AppletsReplies: 2Last Post: 02-08-2009, 02:29 AM -
BFS using APPLET
By bharanidharanit in forum Java AppletsReplies: 3Last Post: 12-30-2008, 02:45 AM -
Applet, To center text and To open I engage in a dialog in an Applet
By Marcus in forum Java AppletsReplies: 4Last Post: 06-08-2007, 06:15 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks