Пример #1
0
        public static string createJarStubForDotNetDll(string dllToConvert, string targetDirectory)
        {
            if (IKVMInstall.checkIKVMInstallation())
            {
                var processExecutionArguments = string.Format("\"{0}\"", dllToConvert);
                var processExecResult         =
                    Processes.startProcessAsConsoleApplicationAndReturnConsoleOutput(IKVMConfig.IKVMStubExecutable,
                                                                                     processExecutionArguments, targetDirectory, true);
                DI.log.info(processExecResult);


                /*var createdJarFile =
                 *  Path.Combine(Path.GetDirectoryName(dllToConvert), Path.GetFileNameWithoutExtension(dllToConvert)) +
                 *  ".jar";
                 */
                var createdJarFile = Path.Combine(targetDirectory, Path.GetFileNameWithoutExtension(dllToConvert)) + ".jar";
                if (File.Exists(createdJarFile))
                {
                    //var jarFileInTargetDirectory = Files.Copy(createdJarFile, targetDirectory);
                    DI.log.info("Created Jar file: {0}", createdJarFile);
                    return(createdJarFile);
                }
                DI.log.info("Was not able to create Jar file for dll: {0}", dllToConvert);
            }
            return("");
        }
Пример #2
0
 static JavaCompile()
 {
     IKVMInstall.checkIfJavaPathIsCorrectlySet();
 }
 static JavaExec()
 {
     IKVMInstall.checkIKVMInstallation();
 }