Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.security.CodeSource;
import java.text.MessageFormat;

public class Main {
    private static String getJaxpImplementationInfo(String componentName, Class componentClass) {
        CodeSource source = componentClass.getProtectionDomain().getCodeSource();
        return MessageFormat.format("{0} implementation: {1} loaded from: {2}", componentName,
                componentClass.getName(), source == null ? "Java Runtime" : source.getLocation());
    }
}