Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 jdk.compiler.jmod - Compiler Tool
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "javac" command.
JDK 17 Compiler tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.compiler.jmod.
JDK 17 Compiler tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Compiler source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.compiler.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/sjavac/comp/CompilationService.java
/* * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.sjavac.comp; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.net.URI; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.StandardLocation; import javax.tools.ToolProvider; import com.sun.tools.javac.api.JavacTaskImpl; import com.sun.tools.javac.api.JavacTool; import com.sun.tools.javac.main.Main; import com.sun.tools.javac.main.Main.Result; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.Dependencies; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.sjavac.Log; import com.sun.tools.sjavac.Util; import com.sun.tools.sjavac.comp.dependencies.NewDependencyCollector; import com.sun.tools.sjavac.comp.dependencies.PublicApiCollector; import com.sun.tools.sjavac.server.CompilationSubResult; import com.sun.tools.sjavac.server.SysInfo; /** * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class CompilationService { public SysInfo getSysInfo() { return new SysInfo(Runtime.getRuntime().availableProcessors(), Runtime.getRuntime().maxMemory()); } public CompilationSubResult compile(String protocolId, String invocationId, String[] args, List<File> explicitSources, Set<URI> sourcesToCompile, Set<URI> visibleSources) { JavacTool compiler = (JavacTool) ToolProvider.getSystemJavaCompiler(); try (StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null)) { SmartFileManager sfm = new SmartFileManager(fm); Context context = new Context(); Dependencies.GraphDependencies.preRegister(context); // Now setup the actual compilation CompilationSubResult compilationResult = new CompilationSubResult(Result.OK); // First deal with explicit source files on cmdline and in at file ListBuffer<JavaFileObject> explicitJFOs = new ListBuffer<>(); for (JavaFileObject jfo : fm.getJavaFileObjectsFromFiles(explicitSources)) { explicitJFOs.append(SmartFileManager.locWrap(jfo, StandardLocation.SOURCE_PATH)); } // Now deal with sources supplied as source_to_compile ListBuffer<File> sourcesToCompileFiles = new ListBuffer<>(); for (URI u : sourcesToCompile) sourcesToCompileFiles.append(new File(u)); for (JavaFileObject jfo : fm.getJavaFileObjectsFromFiles(sourcesToCompileFiles)) explicitJFOs.append(SmartFileManager.locWrap(jfo, StandardLocation.SOURCE_PATH)); // Create a log to capture compiler output StringWriter stderrLog = new StringWriter(); Result result; PublicApiCollector pubApiCollector = new PublicApiCollector(context, explicitJFOs); PathAndPackageVerifier papVerifier = new PathAndPackageVerifier(); NewDependencyCollector depsCollector = new NewDependencyCollector(context, explicitJFOs); try { if (explicitJFOs.size() > 0) { sfm.setVisibleSources(visibleSources); sfm.cleanArtifacts(); // Do the compilation! JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(new PrintWriter(stderrLog), sfm, null, Arrays.asList(args), null, explicitJFOs, context); sfm.setSymbolFileEnabled(!com.sun.tools.javac.util.Options.instance(context).isSet("ignore.symbol.file")); task.addTaskListener(depsCollector); task.addTaskListener(pubApiCollector); task.addTaskListener(papVerifier); logJavacInvocation(args); result = task.doCall(); Log.debug("javac result: " + result); sfm.flush(); } else { result = Result.ERROR; } } catch (Exception e) { Log.error(Util.getStackTrace(e)); stderrLog.append(Util.getStackTrace(e)); result = Result.ERROR; } compilationResult.packageArtifacts = sfm.getPackageArtifacts(); if (papVerifier.errorsDiscovered()) { result = Result.ERROR; } compilationResult.packageDependencies = depsCollector.getDependencies(false); compilationResult.packageCpDependencies = depsCollector.getDependencies(true); compilationResult.packagePubapis = pubApiCollector.getPubApis(true); compilationResult.dependencyPubapis = pubApiCollector.getPubApis(false); compilationResult.stderr = stderrLog.toString(); compilationResult.result = result; return compilationResult; } catch (IOException e) { throw new Error(e); } } private void logJavacInvocation(String[] args) { Log.debug("Invoking javac with args"); Iterator<String> argIter = Arrays.asList(args).iterator(); while (argIter.hasNext()) { String arg = argIter.next(); String line = " " + arg; if (arg.matches("\\-(d|cp|classpath|sourcepath|source|target)") && argIter.hasNext()) { line += " " + argIter.next(); } Log.debug(line); } } }
⏎ com/sun/tools/sjavac/comp/CompilationService.java
Or download all of them as a single archive file:
File name: jdk.compiler-17.0.5-src.zip File size: 1450209 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.crypto.cryptoki.jmod - Crypto KI Module
2023-10-15, 17710👍, 0💬
Popular Posts:
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool. JDK 11 JDI tool com...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers. Both...