Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JDK 17 jdk.jdi.jmod - JDI Tool
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool.
JDK 17 JDI tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jdi.jmod.
JDK 17 JDI tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JDI tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jdi.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/jdi/AbstractLauncher.java
/* * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.jdi; import java.io.IOException; import java.io.InterruptedIOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import com.sun.jdi.Bootstrap; import com.sun.jdi.InternalException; import com.sun.jdi.VirtualMachine; import com.sun.jdi.VirtualMachineManager; import com.sun.jdi.connect.Connector; import com.sun.jdi.connect.IllegalConnectorArgumentsException; import com.sun.jdi.connect.LaunchingConnector; import com.sun.jdi.connect.VMStartException; import com.sun.jdi.connect.spi.Connection; import com.sun.jdi.connect.spi.TransportService; abstract class AbstractLauncher extends ConnectorImpl implements LaunchingConnector { abstract public VirtualMachine launch(Map<String, ? extends Connector.Argument> arguments) throws IOException, IllegalConnectorArgumentsException, VMStartException; abstract public String name(); abstract public String description(); ThreadGroup grp; AbstractLauncher() { super(); grp = Thread.currentThread().getThreadGroup(); ThreadGroup parent = null; while ((parent = grp.getParent()) != null) { grp = parent; } } String[] tokenizeCommand(String command, char quote) { String quoteStr = String.valueOf(quote); // easier to deal with /* * Tokenize the command, respecting the given quote character. */ StringTokenizer tokenizer = new StringTokenizer(command, quote + " \t\r\n\f", true); String quoted = null; String pending = null; List<String> tokenList = new ArrayList<>(); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); if (quoted != null) { if (token.equals(quoteStr)) { tokenList.add(quoted); quoted = null; } else { quoted += token; } } else if (pending != null) { if (token.equals(quoteStr)) { quoted = pending; } else if ((token.length() == 1) && Character.isWhitespace(token.charAt(0))) { tokenList.add(pending); } else { throw new InternalException("Unexpected token: " + token); } pending = null; } else { if (token.equals(quoteStr)) { quoted = ""; } else if ((token.length() == 1) && Character.isWhitespace(token.charAt(0))) { // continue } else { pending = token; } } } /* * Add final token. */ if (pending != null) { tokenList.add(pending); } /* * An unclosed quote at the end of the command. Do an * implicit end quote. */ if (quoted != null) { tokenList.add(quoted); } String[] tokenArray = new String[tokenList.size()]; for (int i = 0; i < tokenList.size(); i++) { tokenArray[i] = tokenList.get(i); } return tokenArray; } protected VirtualMachine launch(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts) throws IOException, VMStartException { Helper helper = new Helper(commandArray, address, listenKey, ts); helper.launchAndAccept(); VirtualMachineManager manager = Bootstrap.virtualMachineManager(); return manager.createVirtualMachine(helper.connection(), helper.process()); } /** * This class simply provides a context for a single launch and * accept. It provides instance fields that can be used by * all threads involved. This stuff can't be in the Connector proper * because the connector is a singleton and is not specific to any * one launch. */ private class Helper { @SuppressWarnings("unused") private final String address; private TransportService.ListenKey listenKey; private TransportService ts; private final String[] commandArray; private Process process = null; private Connection connection = null; private IOException acceptException = null; private boolean exited = false; Helper(String[] commandArray, String address, TransportService.ListenKey listenKey, TransportService ts) { this.commandArray = commandArray; this.address = address; this.listenKey = listenKey; this.ts = ts; } String commandString() { String str = ""; for (int i = 0; i < commandArray.length; i++) { if (i > 0) { str += " "; } str += commandArray[i]; } return str; } synchronized void launchAndAccept() throws IOException, VMStartException { process = Runtime.getRuntime().exec(commandArray); Thread acceptingThread = acceptConnection(); Thread monitoringThread = monitorTarget(); try { while ((connection == null) && (acceptException == null) && !exited) { wait(); } if (exited) { throw new VMStartException( "VM initialization failed for: " + commandString(), process); } if (acceptException != null) { // Rethrow the exception in this thread throw acceptException; } } catch (InterruptedException e) { throw new InterruptedIOException("Interrupted during accept"); } finally { acceptingThread.interrupt(); monitoringThread.interrupt(); } } Process process() { return process; } Connection connection() { return connection; } synchronized void notifyOfExit() { exited = true; notify(); } synchronized void notifyOfConnection(Connection connection) { this.connection = connection; notify(); } synchronized void notifyOfAcceptException(IOException acceptException) { this.acceptException = acceptException; notify(); } Thread monitorTarget() { Thread thread = new Thread(grp, "launched target monitor") { public void run() { try { process.waitFor(); /* * Notify waiting thread of VM error termination */ notifyOfExit(); } catch (InterruptedException e) { // Connection has been established, stop monitoring } } }; thread.setDaemon(true); thread.start(); return thread; } Thread acceptConnection() { Thread thread = new Thread(grp, "connection acceptor") { public void run() { try { Connection connection = ts.accept(listenKey, 0, 0); /* * Notify waiting thread of connection */ notifyOfConnection(connection); } catch (InterruptedIOException e) { // VM terminated, stop accepting } catch (IOException e) { // Report any other exception to waiting thread notifyOfAcceptException(e); } } }; thread.setDaemon(true); thread.start(); return thread; } } }
⏎ com/sun/tools/jdi/AbstractLauncher.java
Or download all of them as a single archive file:
File name: jdk.jdi-17.0.5-src.zip File size: 476972 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jdwp.agent.jmod - JDWP Agent Module
2023-04-17, ≈28🔥, 0💬
Popular Posts:
What Is poi-scratchpad-5.2.3.jar ?poi-scratchpad-5.2.3.jar is one of the JAR files for Apache POI 5....
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
What Is HttpComponents httpcore-4.2.2.jar? HttpComponents httpcore-4.2.2.jar is the JAR file for Apa...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
JUnit Source Code Files are provided in the source package file, junit-4.13.2-sources.jar .You can b...