< prev index next >
src/jdk.jpackage/share/native/libapplauncher/JavaVirtualMachine.cpp
Print this page
*** 26,40 ****
#include "JavaVirtualMachine.h"
#include "Platform.h"
#include "PlatformString.h"
#include "FilePath.h"
#include "Package.h"
- #include "JavaTypes.h"
#include "Helpers.h"
#include "Messages.h"
#include "Macros.h"
- #include "PlatformThread.h"
#include "jni.h"
#include <map>
#include <list>
--- 26,38 ----
*** 52,90 ****
}
return result;
}
- JavaLibrary::JavaLibrary() : Library(), FCreateProc(NULL) {
- }
-
- bool JavaLibrary::JavaVMCreate(size_t argc, char *argv[]) {
- if (FCreateProc == NULL) {
- FCreateProc = (JVM_CREATE)GetProcAddress(LAUNCH_FUNC);
- }
-
- if (FCreateProc == NULL) {
- Platform& platform = Platform::GetInstance();
- Messages& messages = Messages::GetInstance();
- platform.ShowMessage(
- messages.GetMessage(FAILED_LOCATING_JVM_ENTRY_POINT));
- return false;
- }
-
- return FCreateProc((int)argc, argv,
- 0, NULL,
- 0, NULL,
- "",
- "",
- "java",
- "java",
- false,
- false,
- false,
- 0) == 0;
- }
-
//----------------------------------------------------------------------------
JavaOptions::JavaOptions(): FOptions(NULL) {
}
--- 50,59 ----
*** 263,288 ****
}
void JavaVirtualMachine::configureLibrary() {
Platform& platform = Platform::GetInstance();
Package& package = Package::GetInstance();
- // TODO: Clean this up. Because of bug JDK-8131321 the opening of the
- // PE file ails in WindowsPlatform.cpp on the check to
- // if (pNTHeader->Signature == IMAGE_NT_SIGNATURE)
TString libName = package.GetJVMLibraryFileName();
! #ifdef _WIN64
! if (FilePath::FileExists(_T("msvcr100.dll")) == true) {
! javaLibrary.AddDependency(_T("msvcr100.dll"));
! }
!
! TString runtimeBin = platform.GetPackageRuntimeBinDirectory();
! SetDllDirectory(runtimeBin.c_str());
! #else
! javaLibrary.AddDependencies(
! platform.FilterOutRuntimeDependenciesForPlatform(
! platform.GetLibraryImports(libName)));
! #endif
javaLibrary.Load(libName);
}
bool JavaVirtualMachine::launchVM(JavaOptions& options,
std::list<TString>& vmargs) {
--- 232,243 ----
}
void JavaVirtualMachine::configureLibrary() {
Platform& platform = Platform::GetInstance();
Package& package = Package::GetInstance();
TString libName = package.GetJVMLibraryFileName();
! platform.addPlatformDependencies(&javaLibrary);
javaLibrary.Load(libName);
}
bool JavaVirtualMachine::launchVM(JavaOptions& options,
std::list<TString>& vmargs) {
< prev index next >