Closed Bug 178329 Opened 22 years ago Closed 22 years ago

MRJPlugin for Mac OS X needs to be able to specify which JVM to load

Categories

(Core Graveyard :: Java: OJI, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 97613

People

(Reporter: beard, Assigned: sfraser_bugs)

References

Details

(Keywords: topembed+, Whiteboard: edt_c3,edt_d3)

Attachments

(1 file)

1. Java 1.4.1 Developer Preview 2 does not include embedding support. Because Apple's Java 1.4.1 implementation is so radically different from the previous implementation, the Java Embedding components have been completely redesigned. These components are not yet ready for use by external developers. 2. Apple is actively working to develop a solution for embedding support on our Java 1.4.1 implementation. Apple is currently working to provide embedding support for the new Java 1.4.1 implementation. The current plan is that the existing JavaEmbedding framework will be obsoleted, and will not be part of the new solution. In the future, Apple will provide Java plugins compatible with both Carbon applications and Cocoa applications. 3. Apple will continue to ship a Java 1.3.1 VM for the near term. To provide a smooth transition from our existing Java 1.3.1 implementation to our new Java 1.4.1 implementation, Apple will ship both a Java 1.3.1 VM and a Java 1.4.1 VM. The Java 1.3.1 VM will remain on the system until it is no longer necessary. 4. Clients of the existing embedding framework should explicitly start a Java 1.3.1 VM. The existing JavaEmbedding Framework, used with Java 1.3.1, is not compatible with our Java 1.4.1 implementation. Browsers that access the existing JavaEmbedding Framework should explicitly start a Java 1.3.1 VM until they can transition to the new Java 1.4.1 embedding components. By explicitly starting a Java 1.3.1 VM, binary compatibility can be ensured for browsers that currently run on MacOS 10.2. 5. Instructions for starting a specific version of the VM These instructions require the use of a private API provided by Apple to ease the transtition from Java 1.3.1 to Java 1.4.1 only. This private API will not be available indefinitely, nor is it supported for any other use. /* private API function prototype */ extern void * _NSLoadJavaVirtualMachine( const char *jvm_name, const char *jvm_version ); /* Before starting a Java VM, * preload a specific version of the libraries. * * For compatibility with MacOS 10.2, * use "hotspot" for jvm_name and "1.3.1" for jvm_version. * * Returns an opaque pointer representing Java VM on success * or NULL on failure. */ void *vm_loaded = _NSLoadJavaVirtualMachine( "hotspot", "1.3.1" ); if ( vm_loaded != NULL ) { /* start javaVM as you normally would */ }
First cut patch.
Comment on attachment 105118 [details] [diff] [review] Load Specific JVM patch v1 r=sdagley
Attachment #105118 - Flags: review+
Comment on attachment 105118 [details] [diff] [review] Load Specific JVM patch v1 Some comments in JavaVMFramework.cpp would be nice. Where does _NSLoadJavaVirtualMachine come from? + if (_NSLoadJavaVirtualMachine("hotspot", "1.3.1")) mStatus = ::JNI_CreateJavaVM(&mJavaVM, (void**) &mMainEnv, &theInitArgs); + else + mStatus = unimpErr; I assme this is diff -w foo?
Attachment #105118 - Flags: superreview+
-> sfraser
Assignee: beard → sfraser
I think we're starting to see feedback on problems with JVM 1.4 seeds so we need this on trunk and chimera branches real soon now
Comment on attachment 105118 [details] [diff] [review] Load Specific JVM patch v1 We need to get this checked in ASAP. Seeking approval.
Attachment #105118 - Flags: approval1.3a?
This patch needs testing on 10.1. Are we event building a MachO MRJ plugin for Mozilla trunk builds?
This doesn't build in Macho: ld: Undefined symbols: _NSLoadJavaVirtualMachine(char const*, char const*)
Assignee: sfraser → beard
So Macho needs: // see http://bugzilla.mozilla.org/show_bug.cgi?id=178329 for more info. extern "C" void * _NSLoadJavaVirtualMachine(const char *jvm_name, const char *jvm_version); because it never sees the header. It links now; I'll check this in for Chimera.
Comment on attachment 105118 [details] [diff] [review] Load Specific JVM patch v1 a=asa for checkin to 1.3a
Attachment #105118 - Flags: approval1.3a? → approval1.3a+
Apple released 1.4.1 on http://www.apple.com/java , is Mozilla already handling this new JVM ?
Blocks: 197865
->sfraser, did this ever make it to trunk?
Assignee: beard → sfraser
Keywords: topembed
Discussed in edt bug triage. Plussing.
Keywords: topembedtopembed+
Whiteboard: edt_c3,edt_d3
This will be fixed with bug 97613. *** This bug has been marked as a duplicate of 97613 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: