diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk index 8809842608f28f9f69f2fb52f3724a43a7d3fb9b..9f6bd2a55abcecf3a1adf83e0c1cca2995d58a5e 100644 --- a/make/common/shared/Sanity.gmk +++ b/make/common/shared/Sanity.gmk @@ -1572,31 +1572,31 @@ ifeq ($(ARCH_DATA_MODEL), 32) endif -###################################################### -# SECURITY_BASELINE_142 test -###################################################### -security_baseline_142: -ifeq ($(PLATFORM), windows) - @if [ -z "$(SECURITY_BASELINE_142)" ]; then \ - $(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \ - " Setting it to the default value of 1.4.2_10.\n" \ - " It is recommended to set SECURITY_BASELINE_142.\n" \ - "" >> $(WARNING_FILE) ; \ - fi -endif - -###################################################### -# SECURITY_BASELINE_150 test -###################################################### -security_baseline_150: -ifeq ($(PLATFORM), windows) - @if [ -z "$(SECURITY_BASELINE_150)" ]; then \ - $(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \ - " Setting it to the default value of 1.5.0_07.\n" \ - " It is recommended to set SECURITY_BASELINE_150.\n" \ - "" >> $(WARNING_FILE) ; \ - fi -endif +###################################################### +# SECURITY_BASELINE_142 test +###################################################### +security_baseline_142: +ifeq ($(PLATFORM), windows) + @if [ -z "$(SECURITY_BASELINE_142)" ]; then \ + $(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \ + " Setting it to the default value of 1.4.2_10.\n" \ + " It is recommended to set SECURITY_BASELINE_142.\n" \ + "" >> $(WARNING_FILE) ; \ + fi +endif + +###################################################### +# SECURITY_BASELINE_150 test +###################################################### +security_baseline_150: +ifeq ($(PLATFORM), windows) + @if [ -z "$(SECURITY_BASELINE_150)" ]; then \ + $(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \ + " Setting it to the default value of 1.5.0_07.\n" \ + " It is recommended to set SECURITY_BASELINE_150.\n" \ + "" >> $(WARNING_FILE) ; \ + fi +endif ###################################################### diff --git a/make/docs/CORE_PKGS.gmk b/make/docs/CORE_PKGS.gmk index dce55eea7563f66d47a9a420a095b3aad9917b0d..03d95a606aaf95b76b068769665c5d722927cea7 100644 --- a/make/docs/CORE_PKGS.gmk +++ b/make/docs/CORE_PKGS.gmk @@ -49,8 +49,8 @@ EXCLUDE_PKGS = \ # ACTIVE_JSR_PKGS are packages that are part of an active JSR process-- # one that is doing its own review. These packages are not included when # creating diff pages for the platform's JCP process. -# -# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs) +# +# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs) # Note: # This is a list of regular expressions. So foo.* matches "foo" and "foo.bar". # @@ -72,13 +72,13 @@ ACTIVE_JSR_PKGS= \ # CORE_PKGS is the list of packages that form the # Java API Specification. # -### ***IMPORTANT NOTE*** -### There is also a "REGEXP" variable in the docs/makefile that -### determines which table the packages go in on the main page. -### Currently, there is only table ("Platform Packages") and -### everything goes in it, so REGEXP is "*". But if that policy -### changes, packages added will need to be reflected in that -### list of wildcard expressions, as well. +### ***IMPORTANT NOTE*** +### There is also a "REGEXP" variable in the docs/makefile that +### determines which table the packages go in on the main page. +### Currently, there is only table ("Platform Packages") and +### everything goes in it, so REGEXP is "*". But if that policy +### changes, packages added will need to be reflected in that +### list of wildcard expressions, as well. ### CORE_PKGS = \ java.applet \ diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties index e592c36caba0207519290ad5481130315a4802f3..f0feb6395c034f33c150f09061e2453ce4881610 100644 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties +++ b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties @@ -1,5 +1,6 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method +# +# Default Input method display names for Indic input methods +# + +DisplayName.Devanagari = Devanagari Input Method + diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties b/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties index f88a4bf2dcaa8817cadb516ff9610f604babeb0c..e4528a49a5337f0fe21ffbbe1b06062ac5708f4e 100644 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties +++ b/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties @@ -1,5 +1,6 @@ -# -# Default Input method display names for Thai input methods -# - -DisplayName.Thai = Thai Input Method +# +# Default Input method display names for Thai input methods +# + +DisplayName.Thai = Thai Input Method + diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd index f57b9fabe4d3aa59de28f6c0c3930a8251a2a916..1e886bf17760aad26920c92726ae1c9554deb86a 100644 --- a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd +++ b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd @@ -1,73 +1,73 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml index e6881361512371981f7ef7e20a5c5f2d226b3dd5..d0d6edcee6956942553a2055b1362f08fa2f8e60 100644 --- a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml +++ b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml @@ -1,380 +1,380 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd index d69852ff8421c3400819831b6c16b56ce3f8d0af..3a08c64f4b6a93c30b83468c3827df0fe0231c9c 100644 --- a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd +++ b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd @@ -1,347 +1,347 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties index 1b8e97bfd633971f6c88b0130b4bca5cba396c54..8c8b2ab1f8dc85b7ff0a6a10ae90d5c95ddd9b35 100644 --- a/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties +++ b/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties @@ -1,123 +1,123 @@ -algorithm.alreadyRegistered = URI {0} already assigned to class {1} -algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH -algorithm.ClassDoesNotExist = Class {0} does not exist -algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2} -algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures. -algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures. -algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs. -algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms -algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1} -algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm -algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1} -algorithms.operationOnlyVerification = A public key can only used for verification of a signature. -algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed. -attributeValueIllegal = The attribute {0} has value {1} but must be {2} -c14n.Canonicalizer.Exception = Exception during Canonicalization: Original Message was {0} -c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1} -c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0} -c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization: Original Message was {0} -c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}" -c14n.Canonicalizer.SAXException = SAXException during Canonicalization: Original Message was {0} -c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0} -c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0} -c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation -c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document) -certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0} -certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString -certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier -defaultNamespaceCannotBeSetHere = Default namespace cannot be set here -ElementProxy.nullElement = Cannot create an ElementProxy from a null argument -empty = {0} -encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0} -encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams -encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt -encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap -encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit -encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this. -encryption.RSAOAEP.dataHashWrong = data hash wrong -encryption.RSAOAEP.dataStartWrong = data wrong start {0} -encryption.RSAOAEP.dataTooShort = data too short -encryption.RSAPKCS15.blockTruncated = block truncated -encryption.RSAPKCS15.noDataInBlock = no data in block -encryption.RSAPKCS15.unknownBlockType = unknown block type -encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers -endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at how to solve this problem. -errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution. -errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed. -errorMessages.IOException = Other file I/O and similar exceptions. -errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again. -errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again. -errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0} -errorMessages.NotYetImplementedException = Functionality not yet there. -errorMessages.XMLSignatureException = Verification failed for some other reason. -decoding.divisible.four = It should be divisible by four -decoding.general = Error while decoding -FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented. -FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0} -FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1} -FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0} -generic.dontHaveConstructionElement = I do not have a construction Element -generic.EmptyMessage = {0} -generic.NotYetImplemented = {0} Not YET implemented ;-(( -java.security.InvalidKeyException = Invalid key -java.security.NoSuchProviderException = Unknown or unsupported provider -java.security.UnknownKeyType = Unknown or unsupported key type {0} -KeyInfo.needKeyResolver = More than one keyResovler have to be registered -KeyInfo.nokey = Cannot get key from {0} -KeyInfo.noKey = Cannot get the public key -KeyInfo.wrongNumberOfObject = Need {0} keyObjects -KeyInfo.wrongUse = This object was made for getting {0} -keyResolver.alreadyRegistered = {1} class has already been registered for {0} -KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0} -KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0} -KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0} -KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0} -KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0} -KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0} -KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0} -KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0} -KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0} -KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0} -KeyStore.alreadyRegistered = {0} Class has already been registered for {1} -KeyStore.register = {1} type class register error in class {0} -KeyStore.registerStore.register = Registeration error for type {0} -KeyValue.IllegalArgument = Cannot create a {0} from {1} -namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1} -notYetInitialized = The module {0} is not yet initialized -prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2} -signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0} -signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature -signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first -signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set -signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform -signature.Transform.NotYetImplemented = Transform {0} not yet implemented -signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug? -signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0} -signature.Transform.node = Current Node: {0} -signature.Transform.nodeAndType = Current Node: {0}, type: {1} -signature.Util.BignumNonPositive = bigInteger.signum() must be positive -signature.Util.NonTextNode = Not a text node -signature.Util.TooManyChilds = Too many childs of Type {0} in {1} -signature.Verification.certificateError = Certificate error -signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References -signature.Verification.internalError = Internal error -signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0} -signature.Verification.keyStore = KeyStore error -signature.Verification.MissingID = Cannot resolve element with ID {0} -signature.Verification.MissingResources = Cannot resolve external resource {0} -signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1} -signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput -signature.Verification.SignatureError = Signature error -signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0} -signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it -signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference -transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream. -transform.init.NotInitialized = -transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization -utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4 -Base64Decoding = Error while decoding -utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1} -xml.WrongContent = Cannot find {0} in {1} -xml.WrongElement = Cannot create a {0} from a {1} element -xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node -xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0} +algorithm.alreadyRegistered = URI {0} already assigned to class {1} +algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH +algorithm.ClassDoesNotExist = Class {0} does not exist +algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2} +algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures. +algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures. +algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs. +algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms +algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1} +algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm +algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1} +algorithms.operationOnlyVerification = A public key can only used for verification of a signature. +algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed. +attributeValueIllegal = The attribute {0} has value {1} but must be {2} +c14n.Canonicalizer.Exception = Exception during Canonicalization: Original Message was {0} +c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1} +c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0} +c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization: Original Message was {0} +c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}" +c14n.Canonicalizer.SAXException = SAXException during Canonicalization: Original Message was {0} +c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0} +c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0} +c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation +c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document) +certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0} +certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString +certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier +defaultNamespaceCannotBeSetHere = Default namespace cannot be set here +ElementProxy.nullElement = Cannot create an ElementProxy from a null argument +empty = {0} +encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0} +encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams +encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt +encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap +encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit +encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this. +encryption.RSAOAEP.dataHashWrong = data hash wrong +encryption.RSAOAEP.dataStartWrong = data wrong start {0} +encryption.RSAOAEP.dataTooShort = data too short +encryption.RSAPKCS15.blockTruncated = block truncated +encryption.RSAPKCS15.noDataInBlock = no data in block +encryption.RSAPKCS15.unknownBlockType = unknown block type +encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers +endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at how to solve this problem. +errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution. +errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed. +errorMessages.IOException = Other file I/O and similar exceptions. +errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again. +errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again. +errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0} +errorMessages.NotYetImplementedException = Functionality not yet there. +errorMessages.XMLSignatureException = Verification failed for some other reason. +decoding.divisible.four = It should be divisible by four +decoding.general = Error while decoding +FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented. +FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0} +FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1} +FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0} +generic.dontHaveConstructionElement = I do not have a construction Element +generic.EmptyMessage = {0} +generic.NotYetImplemented = {0} Not YET implemented ;-(( +java.security.InvalidKeyException = Invalid key +java.security.NoSuchProviderException = Unknown or unsupported provider +java.security.UnknownKeyType = Unknown or unsupported key type {0} +KeyInfo.needKeyResolver = More than one keyResovler have to be registered +KeyInfo.nokey = Cannot get key from {0} +KeyInfo.noKey = Cannot get the public key +KeyInfo.wrongNumberOfObject = Need {0} keyObjects +KeyInfo.wrongUse = This object was made for getting {0} +keyResolver.alreadyRegistered = {1} class has already been registered for {0} +KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0} +KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0} +KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0} +KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0} +KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0} +KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0} +KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0} +KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0} +KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0} +KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0} +KeyStore.alreadyRegistered = {0} Class has already been registered for {1} +KeyStore.register = {1} type class register error in class {0} +KeyStore.registerStore.register = Registeration error for type {0} +KeyValue.IllegalArgument = Cannot create a {0} from {1} +namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1} +notYetInitialized = The module {0} is not yet initialized +prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2} +signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0} +signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature +signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first +signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set +signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform +signature.Transform.NotYetImplemented = Transform {0} not yet implemented +signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug? +signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0} +signature.Transform.node = Current Node: {0} +signature.Transform.nodeAndType = Current Node: {0}, type: {1} +signature.Util.BignumNonPositive = bigInteger.signum() must be positive +signature.Util.NonTextNode = Not a text node +signature.Util.TooManyChilds = Too many childs of Type {0} in {1} +signature.Verification.certificateError = Certificate error +signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References +signature.Verification.internalError = Internal error +signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0} +signature.Verification.keyStore = KeyStore error +signature.Verification.MissingID = Cannot resolve element with ID {0} +signature.Verification.MissingResources = Cannot resolve external resource {0} +signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1} +signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput +signature.Verification.SignatureError = Signature error +signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0} +signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it +signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference +transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream. +transform.init.NotInitialized = +transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization +utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4 +Base64Decoding = Error while decoding +utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1} +xml.WrongContent = Cannot find {0} in {1} +xml.WrongElement = Cannot create a {0} from a {1} element +xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node +xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0} diff --git a/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd b/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd index 5ac5a61f100e0dc2f6929c0df69b83549ebc1c9d..9188d43e2d4e6bc4e9ba7d86663e987883b33715 100644 --- a/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd +++ b/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd @@ -73,7 +73,7 @@ type (idref|boolean|dimension|insets|integer|string) "idref" value CDATA #REQUIRED > - + - - + + + - - -

- Synth is a skinnable look and feel in which all painting is - delegated. Synth does not provide a default look. In - order to use Synth you need to specify a - file, or - provide a {@link - javax.swing.plaf.synth.SynthStyleFactory}. Both - configuration options require an - understanding of the synth architecture, which is described - below, as well as an understanding of Swing's architecture. -

-

- Unless otherwise specified null is not a legal value to any of - the methods defined in the synth package and if passed in will - result in a NullPointerException. - - -

Synth

-

- Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates - itself with one {@link - javax.swing.plaf.synth.SynthStyle} per {@link - javax.swing.plaf.synth.Region}, most - Components only have one Region and - therefor only one SynthStyle. - SynthStyle - is used to access all style related properties: fonts, colors - and other Component properties. In addition - SynthStyles are used to obtain - {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border, - focus and other portions of a Component. The ComponentUIs obtain - SynthStyles from a - {@link javax.swing.plaf.synth.SynthStyleFactory}. - A SynthStyleFactory - can be provided directly by way of - {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)}, - or indirectly by way of - {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The - following example uses the SynthLookAndFeel.load() - method to configure a SynthLookAndFeel and sets it - as the current look and feel: -

-
-
-  SynthLookAndFeel laf = new SynthLookAndFeel();
+
+
+    

+ Synth is a skinnable look and feel in which all painting is + delegated. Synth does not provide a default look. In + order to use Synth you need to specify a + file, or + provide a {@link + javax.swing.plaf.synth.SynthStyleFactory}. Both + configuration options require an + understanding of the synth architecture, which is described + below, as well as an understanding of Swing's architecture. +

+

+ Unless otherwise specified null is not a legal value to any of + the methods defined in the synth package and if passed in will + result in a NullPointerException. + + +

Synth

+

+ Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates + itself with one {@link + javax.swing.plaf.synth.SynthStyle} per {@link + javax.swing.plaf.synth.Region}, most + Components only have one Region and + therefor only one SynthStyle. + SynthStyle + is used to access all style related properties: fonts, colors + and other Component properties. In addition + SynthStyles are used to obtain + {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border, + focus and other portions of a Component. The ComponentUIs obtain + SynthStyles from a + {@link javax.swing.plaf.synth.SynthStyleFactory}. + A SynthStyleFactory + can be provided directly by way of + {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)}, + or indirectly by way of + {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The + following example uses the SynthLookAndFeel.load() + method to configure a SynthLookAndFeel and sets it + as the current look and feel: +

+
+
+  SynthLookAndFeel laf = new SynthLookAndFeel();
   laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
-  UIManager.setLookAndFeel(laf);
-      
-
-

- Many JComponents are broken down into smaller - pieces and identified by the type safe enumeration in - {@link javax.swing.plaf.synth.Region}. For example, a JTabbedPane - consists of a Region for the - JTabbedPane ({@link - javax.swing.plaf.synth.Region#TABBED_PANE}), the content - area ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the - area behind the tabs ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the - tabs ({@link - javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each - Region of each - JComponent will have a - SynthStyle. This allows - you to customize individual pieces of each region of each - JComponent. -

- Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This - is used to provide information about the current - Component and includes: the - {@link javax.swing.plaf.synth.SynthStyle} associated with the current - {@link javax.swing.plaf.synth.Region}, the state of the Component - as a bitmask (refer to {@link - javax.swing.plaf.synth.SynthConstants} for the valid - states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of - the Component being painted. -

- All text rendering by non-JTextComponents is - delegated to a {@link - javax.swing.plaf.synth.SynthGraphicsUtils}, which is - obtained using the {@link javax.swing.plaf.synth.SynthStyle} method - {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can - customize text rendering - by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}. - -

- -

Notes on specific components

- -

JTree

-

- Synth provides a region for the cells of a tree: - Region.TREE_CELL. To specify the colors of the - renderer you'll want to provide a style for the - TREE_CELL region. The following illustrates this: -

-  <style id="treeCellStyle">
-    <opaque value="TRUE"/>
-    <state>
-      <color value="WHITE" type="TEXT_FOREGROUND"/>
-      <color value="RED" type="TEXT_BACKGROUND"/>
-    </state>
-    <state value="SELECTED">
-      <color value="RED" type="TEXT_FOREGROUND"/>
-      <color value="WHITE" type="BACKGROUND"/>
-    </state>
-  </style>
-  <bind style="treeCellStyle" type="region" key="TreeCell"/>
-
-

- This specifies a color combination of red on white, when - selected, and white on red when not selected. To see the - background you need to specify that labels are not opaque. The - following XML fragment does that: -

-  <style id="labelStyle">
-    <opaque value="FALSE"/>
-  </style>
-  <bind style="labelStyle" type="region" key="Label"/>
-
- -

JList and JTable

-

- The colors that the renderers for JList and JTable use are - specified by way of the list and table Regions. The following - XML fragment illustrates how to specify red on white, when - selected, and white on red when not selected: -

-  <style id="style">
-    <opaque value="TRUE"/>
-    <state>
-      <color value="WHITE" type="TEXT_FOREGROUND"/>
-      <color value="RED" type="TEXT_BACKGROUND"/>
-      <color value="RED" type="BACKGROUND"/>
-    </state>
-    <state value="SELECTED">
-      <color value="RED" type="TEXT_FOREGROUND"/>
-      <color value="WHITE" type="TEXT_BACKGROUND"/>
-    </state>
-  </style>
-  <bind style="style" type="region" key="Table"/>
-  <bind style="style" type="region" key="List"/>
-
- - + UIManager.setLookAndFeel(laf); +
+
+

+ Many JComponents are broken down into smaller + pieces and identified by the type safe enumeration in + {@link javax.swing.plaf.synth.Region}. For example, a JTabbedPane + consists of a Region for the + JTabbedPane ({@link + javax.swing.plaf.synth.Region#TABBED_PANE}), the content + area ({@link + javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the + area behind the tabs ({@link + javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the + tabs ({@link + javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each + Region of each + JComponent will have a + SynthStyle. This allows + you to customize individual pieces of each region of each + JComponent. +

+ Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This + is used to provide information about the current + Component and includes: the + {@link javax.swing.plaf.synth.SynthStyle} associated with the current + {@link javax.swing.plaf.synth.Region}, the state of the Component + as a bitmask (refer to {@link + javax.swing.plaf.synth.SynthConstants} for the valid + states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of + the Component being painted. +

+ All text rendering by non-JTextComponents is + delegated to a {@link + javax.swing.plaf.synth.SynthGraphicsUtils}, which is + obtained using the {@link javax.swing.plaf.synth.SynthStyle} method + {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can + customize text rendering + by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}. + +

+ +

Notes on specific components

+ +

JTree

+

+ Synth provides a region for the cells of a tree: + Region.TREE_CELL. To specify the colors of the + renderer you'll want to provide a style for the + TREE_CELL region. The following illustrates this: +

+  <style id="treeCellStyle">
+    <opaque value="TRUE"/>
+    <state>
+      <color value="WHITE" type="TEXT_FOREGROUND"/>
+      <color value="RED" type="TEXT_BACKGROUND"/>
+    </state>
+    <state value="SELECTED">
+      <color value="RED" type="TEXT_FOREGROUND"/>
+      <color value="WHITE" type="BACKGROUND"/>
+    </state>
+  </style>
+  <bind style="treeCellStyle" type="region" key="TreeCell"/>
+
+

+ This specifies a color combination of red on white, when + selected, and white on red when not selected. To see the + background you need to specify that labels are not opaque. The + following XML fragment does that: +

+  <style id="labelStyle">
+    <opaque value="FALSE"/>
+  </style>
+  <bind style="labelStyle" type="region" key="Label"/>
+
+ +

JList and JTable

+

+ The colors that the renderers for JList and JTable use are + specified by way of the list and table Regions. The following + XML fragment illustrates how to specify red on white, when + selected, and white on red when not selected: +

+  <style id="style">
+    <opaque value="TRUE"/>
+    <state>
+      <color value="WHITE" type="TEXT_FOREGROUND"/>
+      <color value="RED" type="TEXT_BACKGROUND"/>
+      <color value="RED" type="BACKGROUND"/>
+    </state>
+    <state value="SELECTED">
+      <color value="RED" type="TEXT_FOREGROUND"/>
+      <color value="WHITE" type="TEXT_BACKGROUND"/>
+    </state>
+  </style>
+  <bind style="style" type="region" key="Table"/>
+  <bind style="style" type="region" key="List"/>
+
+ + diff --git a/src/share/demo/jfc/Notepad/resources/Notepad.properties b/src/share/demo/jfc/Notepad/resources/Notepad.properties index 9f9ec3a75319665e3fa560544a4db1f1065c608c..fdd5c5a22468817d64b832b8cf4712f7f39c139d 100644 --- a/src/share/demo/jfc/Notepad/resources/Notepad.properties +++ b/src/share/demo/jfc/Notepad/resources/Notepad.properties @@ -1,76 +1,76 @@ -# -# Resource strings for Notepad example - -Title=Notepad -ElementTreeFrameTitle=Elements -ViewportBackingStore=false - -# menubar definition -# -# Each of the strings that follow form a key to be -# used to the actual menu definition. -menubar=file edit debug - -# file Menu definition -# -# Each of the strings that follow form a key to be -# used as the basis of a menu item definition. -# -# open -> Notepad.openAction -# new -> Notepad.newAction -# save -> Notepad.saveAction -# exit -> Notepad.exitAction -file=new open save - exit -fileLabel=File -openLabel=Open -openImage=resources/open.gif -newLabel=New -newImage=resources/new.gif -saveLabel=Save -saveImage=resources/save.gif -exitLabel=Exit - -# -# edit Menu definition -# -# cut -> JTextComponent.cutAction -# copy -> JTextComponent.copyAction -# paste -> JTextComponent.pasteAction -edit=cut copy paste - undo redo -editLabel=Edit -cutLabel=Cut -cutAction=cut-to-clipboard -cutImage=resources/cut.gif -copyLabel=Copy -copyAction=copy-to-clipboard -copyImage=resources/copy.gif -pasteLabel=Paste -pasteAction=paste-from-clipboard -pasteImage=resources/paste.gif -undoLabel=Undo -undoAction=Undo -redoLabel=Redo -redoAction=Redo - -# -# debug Menu definition -# -debug=dump showElementTree -debugLabel=Debug -dumpLabel=Dump model to System.err -dumpAction=dump-model -showElementTreeLabel=Show Elements - -# toolbar definition -# -# Each of the strings that follow form a key to be -# used as the basis of the tool definition. Actions -# are of course sharable, and in this case are shared -# with the menu items. -toolbar=new open save - cut copy paste -newTooltip=Create a new file -openTooltip=Open a file -saveTooltip=Save to a file -cutTooltip=Move selection to clipboard -copyTooltip=Copy selection to clipboard -pasteTooltip=Paste clipboard to selection +# +# Resource strings for Notepad example + +Title=Notepad +ElementTreeFrameTitle=Elements +ViewportBackingStore=false + +# menubar definition +# +# Each of the strings that follow form a key to be +# used to the actual menu definition. +menubar=file edit debug + +# file Menu definition +# +# Each of the strings that follow form a key to be +# used as the basis of a menu item definition. +# +# open -> Notepad.openAction +# new -> Notepad.newAction +# save -> Notepad.saveAction +# exit -> Notepad.exitAction +file=new open save - exit +fileLabel=File +openLabel=Open +openImage=resources/open.gif +newLabel=New +newImage=resources/new.gif +saveLabel=Save +saveImage=resources/save.gif +exitLabel=Exit + +# +# edit Menu definition +# +# cut -> JTextComponent.cutAction +# copy -> JTextComponent.copyAction +# paste -> JTextComponent.pasteAction +edit=cut copy paste - undo redo +editLabel=Edit +cutLabel=Cut +cutAction=cut-to-clipboard +cutImage=resources/cut.gif +copyLabel=Copy +copyAction=copy-to-clipboard +copyImage=resources/copy.gif +pasteLabel=Paste +pasteAction=paste-from-clipboard +pasteImage=resources/paste.gif +undoLabel=Undo +undoAction=Undo +redoLabel=Redo +redoAction=Redo + +# +# debug Menu definition +# +debug=dump showElementTree +debugLabel=Debug +dumpLabel=Dump model to System.err +dumpAction=dump-model +showElementTreeLabel=Show Elements + +# toolbar definition +# +# Each of the strings that follow form a key to be +# used as the basis of the tool definition. Actions +# are of course sharable, and in this case are shared +# with the menu items. +toolbar=new open save - cut copy paste +newTooltip=Create a new file +openTooltip=Open a file +saveTooltip=Save to a file +cutTooltip=Move selection to clipboard +copyTooltip=Copy selection to clipboard +pasteTooltip=Paste clipboard to selection diff --git a/src/share/sample/vm/clr-jvm/Makefile b/src/share/sample/vm/clr-jvm/Makefile index 2515650d1d518ccf4ac1d17a43fb47c11c0d45d3..5b8e6f3b6faf4e3041933df5f853991abbb9ba3f 100644 --- a/src/share/sample/vm/clr-jvm/Makefile +++ b/src/share/sample/vm/clr-jvm/Makefile @@ -29,16 +29,16 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -all: jinvoker.dll invoked.class invoker.exe - -jinvoker.dll: jinvoker.obj Makefile - cl /LD /o jinvoker.dll jinvoker.obj - -jinvoker.obj: jinvoker.cpp jinvokerExp.h Makefile - cl /Fojinvoker.obj /DJINVOKEREEXPORT /c jinvoker.cpp - -invoked.class: invoked.java Makefile - javac invoked.java - -invoker.exe: invoker.cs Makefile - csc /unsafe invoker.cs +all: jinvoker.dll invoked.class invoker.exe + +jinvoker.dll: jinvoker.obj Makefile + cl /LD /o jinvoker.dll jinvoker.obj + +jinvoker.obj: jinvoker.cpp jinvokerExp.h Makefile + cl /Fojinvoker.obj /DJINVOKEREEXPORT /c jinvoker.cpp + +invoked.class: invoked.java Makefile + javac invoked.java + +invoker.exe: invoker.cs Makefile + csc /unsafe invoker.cs diff --git a/src/share/sample/vm/clr-jvm/README.txt b/src/share/sample/vm/clr-jvm/README.txt index a081c878c94bcdbc1fd1a54be31b7e9dc4cd4910..52ed44e6d820c8abd88a16802e7e3cb55475b47b 100644 --- a/src/share/sample/vm/clr-jvm/README.txt +++ b/src/share/sample/vm/clr-jvm/README.txt @@ -1,54 +1,54 @@ -This sample provides Java "Hello World" program that is invoked -from C# application in the same process. - -The problem of direct call of the JVM API from CLR applications -by PInvoke interface is the JVM API functions do not have static -adresses, they need to be got by JNI_CreateJavaVM() call. -The sample contains C++ libraty that wraps JVM API calls by the -static functions that are called from the C# application by -PInvoke interface. - -The sample contains the following files: - -Makefile - make file -README.txt - this readme -invoked.java - the invoked HelloWorld Java program -invoker.cs - C# invoker application -jinvoker.cpp - C++ wrapper -jinvokerExp.h - wrapper library exports - -After the success making the following files are produced: - -invoked.class - the compiled HelloWorld class -invoker.exe - the executable .NET program that invokes Java -jinvoker.dll - the wrapper library - -The following environment needs to be set for the correct sample -build and execution: - -INCLUDE must contain the paths to: - 1. MS Visual C++ standard include - 2. .NET SDK include - 3. Java includes - Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32 - -LIB must contain the paths to: - 1. MS Visual C++ standard libraries - 2. .NET SDK libraries - 3. jvm.dll - Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client - -PATH must contain the paths to: - 1. MS Visual C++ standard bin - 2. MS Dev common bin - 3. .NET SDK libraries - 4. Java bin - 5. jvm.dll - Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH% - -To run the sample please do: - - invoker.exe invoked - - ---Dmitry Ryashchentsev +This sample provides Java "Hello World" program that is invoked +from C# application in the same process. + +The problem of direct call of the JVM API from CLR applications +by PInvoke interface is the JVM API functions do not have static +adresses, they need to be got by JNI_CreateJavaVM() call. +The sample contains C++ libraty that wraps JVM API calls by the +static functions that are called from the C# application by +PInvoke interface. + +The sample contains the following files: + +Makefile - make file +README.txt - this readme +invoked.java - the invoked HelloWorld Java program +invoker.cs - C# invoker application +jinvoker.cpp - C++ wrapper +jinvokerExp.h - wrapper library exports + +After the success making the following files are produced: + +invoked.class - the compiled HelloWorld class +invoker.exe - the executable .NET program that invokes Java +jinvoker.dll - the wrapper library + +The following environment needs to be set for the correct sample +build and execution: + +INCLUDE must contain the paths to: + 1. MS Visual C++ standard include + 2. .NET SDK include + 3. Java includes + Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32 + +LIB must contain the paths to: + 1. MS Visual C++ standard libraries + 2. .NET SDK libraries + 3. jvm.dll + Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client + +PATH must contain the paths to: + 1. MS Visual C++ standard bin + 2. MS Dev common bin + 3. .NET SDK libraries + 4. Java bin + 5. jvm.dll + Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH% + +To run the sample please do: + + invoker.exe invoked + + +--Dmitry Ryashchentsev diff --git a/src/share/sample/vm/clr-jvm/invoker.cs b/src/share/sample/vm/clr-jvm/invoker.cs index 7e5646230bfa48e68b0d21f94d2098a9f90f6a58..b4ae1bb3d0ae1844636e8e1d7b857d4d38e3f3b2 100644 --- a/src/share/sample/vm/clr-jvm/invoker.cs +++ b/src/share/sample/vm/clr-jvm/invoker.cs @@ -29,30 +29,30 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* -*/ - +/* +*/ + using System; using System.Runtime.InteropServices; class jinvoker{ public static int Main(string[] aArgs){ - - // Print Hello to show we are in CLR - Console.WriteLine("Hello from C#"); - if(aArgs.Length > 0) - // invoke JVM - return InvokeMain(aArgs[0]); - else - return -1; + + // Print Hello to show we are in CLR + Console.WriteLine("Hello from C#"); + if(aArgs.Length > 0) + // invoke JVM + return InvokeMain(aArgs[0]); + else + return -1; } // Link the JVM API functions and the wrappers [DllImport("jvm.dll")] public unsafe static extern int JNI_CreateJavaVM(void** ppVm, void** ppEnv, void* pArgs); [DllImport("jinvoker.dll")] public unsafe static extern int MakeJavaVMInitArgs( void** ppArgs ); - [DllImport("jinvoker.dll")] public unsafe static extern void FreeJavaVMInitArgs( void* pArgs ); + [DllImport("jinvoker.dll")] public unsafe static extern void FreeJavaVMInitArgs( void* pArgs ); [DllImport("jinvoker.dll")] public unsafe static extern int FindClass( void* pEnv, String sClass, void** ppClass ); [DllImport("jinvoker.dll")] public unsafe static extern int GetStaticMethodID( void* pEnv, void* pClass, @@ -73,7 +73,7 @@ class jinvoker{ [DllImport("jinvoker.dll")] public unsafe static extern int DestroyJavaVM( void* pJVM ); public unsafe static int InvokeMain( String sClass ){ - + void* pJVM; // JVM struct void* pEnv; // JVM environment void* pVMArgs; // VM args @@ -81,23 +81,23 @@ class jinvoker{ void* pMethod; // The executed method struct void* pArgs; // The executed method arguments struct - // Fill the pVMArgs structs + // Fill the pVMArgs structs MakeJavaVMInitArgs( &pVMArgs ); - // Create JVM + // Create JVM int nRes = JNI_CreateJavaVM( &pJVM, &pEnv, pVMArgs ); if( nRes == 0 ){ - - // Find the executed method class + + // Find the executed method class if(FindClass( pEnv, sClass, &pClass) == 0 ) - - // Find the executed method + + // Find the executed method if( GetStaticMethodID( pEnv, pClass, "main", "([Ljava/lang/String;)V", &pMethod ) == 0 ) - - // Create empty String[] array to pass to the main() + + // Create empty String[] array to pass to the main() if( NewObjectArray( pEnv, 0, "java/lang/String", &pArgs ) == 0 ){ - - // Call main() + + // Call main() nRes = CallStaticVoidMethod( pEnv, pClass, pMethod, pArgs ); if( nRes != -1 ) Console.WriteLine("Result:"+nRes); @@ -116,16 +116,16 @@ class jinvoker{ Console.WriteLine("can not find class:"+sClass); nRes = -102; } - - // Destroy the JVM + + // Destroy the JVM DestroyJavaVM( pJVM ); }else - Console.WriteLine("Can not create Java VM"); - - // Free the JVM args structs + Console.WriteLine("Can not create Java VM"); + + // Free the JVM args structs FreeJavaVMInitArgs(pVMArgs); - + return nRes; } } diff --git a/src/share/sample/vm/jvm-clr/README.txt b/src/share/sample/vm/jvm-clr/README.txt index a8fe79db343b3ab902827229ff704377cd274539..1d1c2f4bb12575c200d15587bb00dea85bc0ab05 100644 --- a/src/share/sample/vm/jvm-clr/README.txt +++ b/src/share/sample/vm/jvm-clr/README.txt @@ -42,10 +42,10 @@ PATH must contain the paths to: 3. .NET SDK libraries 4. Java bin Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%PATH% - -To run the sample please do: - -java invoker invoked.exe - - ---Dmitry Ryashchentsev + +To run the sample please do: + +java invoker invoked.exe + + +--Dmitry Ryashchentsev diff --git a/src/share/sample/vm/jvm-clr/invoked.cs b/src/share/sample/vm/jvm-clr/invoked.cs index 1904bb7191b8b495b68c73b964119f30e0f4b6ba..e5eead480afcc7d87fa2e71e3c7452f800266f39 100644 --- a/src/share/sample/vm/jvm-clr/invoked.cs +++ b/src/share/sample/vm/jvm-clr/invoked.cs @@ -29,17 +29,17 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* -*/ - - +/* +*/ + + using System; class App{ public static int Main(){ - - // Print Hello to show we are in CLR + + // Print Hello to show we are in CLR Console.WriteLine("Hello from C#!!!"); return 0; }