624 JLI_MemFree(resolved);
625 }
626 }
627 }
628 }
629 if (exec_path == NULL) {
630 exec_path = FindExecName(argv[0]);
631 }
632 execname = exec_path;
633 return exec_path;
634 }
635
636 /*
637 * BSD's implementation of CounterGet()
638 */
639 int64_t
640 CounterGet()
641 {
642 struct timeval tv;
643 gettimeofday(&tv, NULL);
644 return (tv.tv_sec * 1000) + tv.tv_usec;
645 }
646
647
648 /* --- Splash Screen shared library support --- */
649
650 static JavaVM* SetJavaVMValue()
651 {
652 JavaVM * jvm = NULL;
653
654 // The handle is good for both the launcher and the libosxapp.dylib
655 void * handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
656 if (handle) {
657 typedef JavaVM* (*JLI_GetJavaVMInstance_t)();
658
659 JLI_GetJavaVMInstance_t JLI_GetJavaVMInstance =
660 (JLI_GetJavaVMInstance_t)dlsym(handle,
661 "JLI_GetJavaVMInstance");
662 if (JLI_GetJavaVMInstance) {
663 jvm = JLI_GetJavaVMInstance();
664 }
|
624 JLI_MemFree(resolved);
625 }
626 }
627 }
628 }
629 if (exec_path == NULL) {
630 exec_path = FindExecName(argv[0]);
631 }
632 execname = exec_path;
633 return exec_path;
634 }
635
636 /*
637 * BSD's implementation of CounterGet()
638 */
639 int64_t
640 CounterGet()
641 {
642 struct timeval tv;
643 gettimeofday(&tv, NULL);
644 return (tv.tv_sec * 1000000) + tv.tv_usec;
645 }
646
647
648 /* --- Splash Screen shared library support --- */
649
650 static JavaVM* SetJavaVMValue()
651 {
652 JavaVM * jvm = NULL;
653
654 // The handle is good for both the launcher and the libosxapp.dylib
655 void * handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
656 if (handle) {
657 typedef JavaVM* (*JLI_GetJavaVMInstance_t)();
658
659 JLI_GetJavaVMInstance_t JLI_GetJavaVMInstance =
660 (JLI_GetJavaVMInstance_t)dlsym(handle,
661 "JLI_GetJavaVMInstance");
662 if (JLI_GetJavaVMInstance) {
663 jvm = JLI_GetJavaVMInstance();
664 }
|