Beispiel #1
0
        private void CompileJavaFiles(string workingDirectory)
        {
            JavaCompilationBuilder compiler = new JavaCompilationBuilder(this.jdkWrapper);

            foreach (string jarFile in this.referencedJars)
            {
                compiler.AddClassPath(jarFile);
            }

            foreach (string sourceFile in this.sourceFiles)
            {
                compiler.AddSources(sourceFile);
            }

            bool success = compiler.Compile(workingDirectory, workingDirectory, this.logger);

            if (success)
            {
                logger.LogInfo(UIResources.JComp_SourceCompilationSucceeded);
            }
            else
            {
                logger.LogError(UIResources.JComp_SourceCompilationFailed);
                throw new JavaCompilerException(UIResources.JComp_CompliationFailed);
            }
        }
        private void CompileJavaFiles(string workingDirectory)
        {
            JavaCompilationBuilder compiler = new JavaCompilationBuilder(this.jdkWrapper);

            foreach (string jarFile in this.referencedJars)
            {
                compiler.AddClassPath(jarFile);
            }

            foreach (string sourceFile in this.sourceFiles)
            {
                compiler.AddSources(sourceFile);
            }

            bool success = compiler.Compile(workingDirectory, workingDirectory, this.logger);

            if (success)
            {
                logger.LogInfo(UIResources.JComp_SourceCompilationSucceeded);
            }
            else
            {
                logger.LogError(UIResources.JComp_SourceCompilationFailed);
                throw new JavaCompilerException(UIResources.JComp_CompliationFailed);
            }
        }