提交 c6c1324e 编写于 作者: O ohair

6627817: Remove ^M characters in all files (Makefiles too)

Summary: Some files included the use of the ^M character, which has been deleted.
Reviewed-by: xdono
上级 cedeea50
......@@ -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
######################################################
......
......@@ -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 \
......
#
# 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
#
# 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
<?xml version='1.0' encoding='UTF-8' ?>
<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
<!ATTLIST Configuration xmlns CDATA #FIXED 'http://www.xmlsecurity.org/NS/#configuration'
target CDATA #IMPLIED>
<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
<!ATTLIST CanonicalizationMethods JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
<!ELEMENT CanonicalizationMethod EMPTY>
<!ATTLIST CanonicalizationMethod URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
<!ATTLIST TransformAlgorithms JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
<!ELEMENT TransformAlgorithm EMPTY>
<!ATTLIST TransformAlgorithm URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
<!ELEMENT Providers (Provider+)>
<!ELEMENT Provider EMPTY>
<!ATTLIST Provider Id ID #REQUIRED
Class CDATA #REQUIRED
Info CDATA #IMPLIED
ProviderURL CDATA #IMPLIED >
<!ELEMENT Algorithms (Algorithm+)>
<!ELEMENT Algorithm (ProviderAlgo+)>
<!ATTLIST Algorithm URI CDATA #REQUIRED
Description CDATA #IMPLIED
AlgorithmClass CDATA #IMPLIED >
<!ELEMENT ProviderAlgo EMPTY>
<!ATTLIST ProviderAlgo ProviderId IDREF #REQUIRED
JCEName CDATA #REQUIRED
JCEAlias CDATA #IMPLIED >
<!ELEMENT Log4J EMPTY>
<!ATTLIST Log4J configFile CDATA 'data/log4j.xml' >
<!ELEMENT ResourceBundles (ResourceBundle+)>
<!ATTLIST ResourceBundles defaultLanguageCode CDATA 'de'
defaultCountryCode CDATA 'DE' >
<!ELEMENT ResourceBundle EMPTY>
<!ATTLIST ResourceBundle LanguageCode CDATA #REQUIRED
CountryCode CDATA #REQUIRED
LOCATION CDATA #REQUIRED >
<!ELEMENT UnitTests (UnitTest+)>
<!ATTLIST UnitTests JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
<!ELEMENT ResourceResolvers (Resolver+)>
<!ELEMENT Resolver EMPTY>
<!ATTLIST Resolver JAVACLASS CDATA #REQUIRED
DESCRIPTION CDATA #IMPLIED >
<!ELEMENT KeyResolvers (KeyResolver+)>
<!ATTLIST KeyResolvers JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
<!ELEMENT KeyResolver EMPTY>
<!ATTLIST KeyResolver URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT UnitTest (#PCDATA)>
<!ATTLIST UnitTest JAVACLASS CDATA #REQUIRED >
<?xml version='1.0' encoding='UTF-8' ?>
<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
<!ATTLIST Configuration xmlns CDATA #FIXED 'http://www.xmlsecurity.org/NS/#configuration'
target CDATA #IMPLIED>
<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
<!ATTLIST CanonicalizationMethods JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
<!ELEMENT CanonicalizationMethod EMPTY>
<!ATTLIST CanonicalizationMethod URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
<!ATTLIST TransformAlgorithms JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
<!ELEMENT TransformAlgorithm EMPTY>
<!ATTLIST TransformAlgorithm URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
<!ELEMENT Providers (Provider+)>
<!ELEMENT Provider EMPTY>
<!ATTLIST Provider Id ID #REQUIRED
Class CDATA #REQUIRED
Info CDATA #IMPLIED
ProviderURL CDATA #IMPLIED >
<!ELEMENT Algorithms (Algorithm+)>
<!ELEMENT Algorithm (ProviderAlgo+)>
<!ATTLIST Algorithm URI CDATA #REQUIRED
Description CDATA #IMPLIED
AlgorithmClass CDATA #IMPLIED >
<!ELEMENT ProviderAlgo EMPTY>
<!ATTLIST ProviderAlgo ProviderId IDREF #REQUIRED
JCEName CDATA #REQUIRED
JCEAlias CDATA #IMPLIED >
<!ELEMENT Log4J EMPTY>
<!ATTLIST Log4J configFile CDATA 'data/log4j.xml' >
<!ELEMENT ResourceBundles (ResourceBundle+)>
<!ATTLIST ResourceBundles defaultLanguageCode CDATA 'de'
defaultCountryCode CDATA 'DE' >
<!ELEMENT ResourceBundle EMPTY>
<!ATTLIST ResourceBundle LanguageCode CDATA #REQUIRED
CountryCode CDATA #REQUIRED
LOCATION CDATA #REQUIRED >
<!ELEMENT UnitTests (UnitTest+)>
<!ATTLIST UnitTests JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
<!ELEMENT ResourceResolvers (Resolver+)>
<!ELEMENT Resolver EMPTY>
<!ATTLIST Resolver JAVACLASS CDATA #REQUIRED
DESCRIPTION CDATA #IMPLIED >
<!ELEMENT KeyResolvers (KeyResolver+)>
<!ATTLIST KeyResolvers JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
<!ELEMENT KeyResolver EMPTY>
<!ATTLIST KeyResolver URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT UnitTest (#PCDATA)>
<!ATTLIST UnitTest JAVACLASS CDATA #REQUIRED >
......@@ -73,7 +73,7 @@
type (idref|boolean|dimension|insets|integer|string) "idref"
value CDATA #REQUIRED
>
<!ELEMENT defaultsProperty EMPTY>
<!ATTLIST defaultsProperty
key CDATA #REQUIRED
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!--
Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......@@ -27,151 +27,151 @@ have any questions.
-->
</head>
<body bgcolor="white">
<p>
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
<a href="doc-files/synthFileFormat.html">file</a>, 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.
</p>
<p>
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 <code>NullPointerException</code>.
<h2>Synth</h2>
<p>
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
<code>Components</code> only have one <code>Region</code> and
therefor only one <code>SynthStyle</code>.
<code>SynthStyle</code>
is used to access all style related properties: fonts, colors
and other <code>Component</code> properties. In addition
<code>SynthStyle</code>s are used to obtain
{@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border,
focus and other portions of a <code>Component</code>. The <code>ComponentUI</code>s obtain
<code>SynthStyle</code>s from a
{@link javax.swing.plaf.synth.SynthStyleFactory}.
A <code>SynthStyleFactory</code>
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 <code>SynthLookAndFeel.load()</code>
method to configure a <code>SynthLookAndFeel</code> and sets it
as the current look and feel:
</p>
<div class="example">
<pre>
SynthLookAndFeel laf = new SynthLookAndFeel();
</head>
<body bgcolor="white">
<p>
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
<a href="doc-files/synthFileFormat.html">file</a>, 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.
</p>
<p>
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 <code>NullPointerException</code>.
<h2>Synth</h2>
<p>
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
<code>Components</code> only have one <code>Region</code> and
therefor only one <code>SynthStyle</code>.
<code>SynthStyle</code>
is used to access all style related properties: fonts, colors
and other <code>Component</code> properties. In addition
<code>SynthStyle</code>s are used to obtain
{@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border,
focus and other portions of a <code>Component</code>. The <code>ComponentUI</code>s obtain
<code>SynthStyle</code>s from a
{@link javax.swing.plaf.synth.SynthStyleFactory}.
A <code>SynthStyleFactory</code>
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 <code>SynthLookAndFeel.load()</code>
method to configure a <code>SynthLookAndFeel</code> and sets it
as the current look and feel:
</p>
<div class="example">
<pre>
SynthLookAndFeel laf = new SynthLookAndFeel();
laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
UIManager.setLookAndFeel(laf);
</pre>
</div>
<p>
Many <code>JComponent</code>s are broken down into smaller
pieces and identified by the type safe enumeration in
{@link javax.swing.plaf.synth.Region}. For example, a <code>JTabbedPane</code>
consists of a <code>Region</code> for the
<code>JTabbedPane</code> ({@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
<code>Region</code> of each
<code>JComponent</code> will have a
<code>SynthStyle</code>. This allows
you to customize individual pieces of each region of each
<code>JComponent</code>.
<p>
Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This
is used to provide information about the current
<code>Component</code> and includes: the
{@link javax.swing.plaf.synth.SynthStyle} associated with the current
{@link javax.swing.plaf.synth.Region}, the state of the <code>Component</code>
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 <code>Component</code> being painted.
<p>
All text rendering by non-<code>JTextComponent</code>s 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}.
</p>
<h2>Notes on specific components</h2>
<h3>JTree</h3>
<p>
Synth provides a region for the cells of a tree:
<code>Region.TREE_CELL</code>. To specify the colors of the
renderer you'll want to provide a style for the
<code>TREE_CELL</code> region. The following illustrates this:
<pre>
&lt;style id="treeCellStyle">
&lt;opaque value="TRUE"/>
&lt;state>
&lt;color value="WHITE" type="TEXT_FOREGROUND"/>
&lt;color value="RED" type="TEXT_BACKGROUND"/>
&lt;/state>
&lt;state value="SELECTED">
&lt;color value="RED" type="TEXT_FOREGROUND"/>
&lt;color value="WHITE" type="BACKGROUND"/>
&lt;/state>
&lt;/style>
&lt;bind style="treeCellStyle" type="region" key="TreeCell"/>
</pre>
<p>
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:
<pre>
&lt;style id="labelStyle">
&lt;opaque value="FALSE"/>
&lt;/style>
&lt;bind style="labelStyle" type="region" key="Label"/>
</pre>
<h3>JList and JTable</h3>
<p>
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:
<pre>
&lt;style id="style">
&lt;opaque value="TRUE"/>
&lt;state>
&lt;color value="WHITE" type="TEXT_FOREGROUND"/>
&lt;color value="RED" type="TEXT_BACKGROUND"/>
&lt;color value="RED" type="BACKGROUND"/>
&lt;/state>
&lt;state value="SELECTED">
&lt;color value="RED" type="TEXT_FOREGROUND"/>
&lt;color value="WHITE" type="TEXT_BACKGROUND"/>
&lt;/state>
&lt;/style>
&lt;bind style="style" type="region" key="Table"/>
&lt;bind style="style" type="region" key="List"/>
</pre>
</body>
</html>
UIManager.setLookAndFeel(laf);
</pre>
</div>
<p>
Many <code>JComponent</code>s are broken down into smaller
pieces and identified by the type safe enumeration in
{@link javax.swing.plaf.synth.Region}. For example, a <code>JTabbedPane</code>
consists of a <code>Region</code> for the
<code>JTabbedPane</code> ({@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
<code>Region</code> of each
<code>JComponent</code> will have a
<code>SynthStyle</code>. This allows
you to customize individual pieces of each region of each
<code>JComponent</code>.
<p>
Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This
is used to provide information about the current
<code>Component</code> and includes: the
{@link javax.swing.plaf.synth.SynthStyle} associated with the current
{@link javax.swing.plaf.synth.Region}, the state of the <code>Component</code>
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 <code>Component</code> being painted.
<p>
All text rendering by non-<code>JTextComponent</code>s 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}.
</p>
<h2>Notes on specific components</h2>
<h3>JTree</h3>
<p>
Synth provides a region for the cells of a tree:
<code>Region.TREE_CELL</code>. To specify the colors of the
renderer you'll want to provide a style for the
<code>TREE_CELL</code> region. The following illustrates this:
<pre>
&lt;style id="treeCellStyle">
&lt;opaque value="TRUE"/>
&lt;state>
&lt;color value="WHITE" type="TEXT_FOREGROUND"/>
&lt;color value="RED" type="TEXT_BACKGROUND"/>
&lt;/state>
&lt;state value="SELECTED">
&lt;color value="RED" type="TEXT_FOREGROUND"/>
&lt;color value="WHITE" type="BACKGROUND"/>
&lt;/state>
&lt;/style>
&lt;bind style="treeCellStyle" type="region" key="TreeCell"/>
</pre>
<p>
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:
<pre>
&lt;style id="labelStyle">
&lt;opaque value="FALSE"/>
&lt;/style>
&lt;bind style="labelStyle" type="region" key="Label"/>
</pre>
<h3>JList and JTable</h3>
<p>
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:
<pre>
&lt;style id="style">
&lt;opaque value="TRUE"/>
&lt;state>
&lt;color value="WHITE" type="TEXT_FOREGROUND"/>
&lt;color value="RED" type="TEXT_BACKGROUND"/>
&lt;color value="RED" type="BACKGROUND"/>
&lt;/state>
&lt;state value="SELECTED">
&lt;color value="RED" type="TEXT_FOREGROUND"/>
&lt;color value="WHITE" type="TEXT_BACKGROUND"/>
&lt;/state>
&lt;/style>
&lt;bind style="style" type="region" key="Table"/>
&lt;bind style="style" type="region" key="List"/>
</pre>
</body>
</html>
#
# 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
......@@ -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
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
......@@ -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;
}
}
......@@ -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
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册