SlideShare a Scribd company logo
Download the full version and explore a variety of ebooks
or textbooks at https://ebookultra.com
Rich client programming plugging into the NetBeans
Platform 1. print Edition Tulach
_____ Tap the link below to start your download _____
https://ebookultra.com/download/rich-client-programming-
plugging-into-the-netbeans-platform-1-print-edition-tulach/
Find ebooks or textbooks at ebookultra.com today!
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookultra.com
to discover even more!
Pro Netbeans IDE 6 Rich Client Platform Edition Adam Myatt
https://ebookultra.com/download/pro-netbeans-ide-6-rich-client-
platform-edition-adam-myatt/
The Definitive Guide to NetBeans Platform 1st Edition
Heiko Böck
https://ebookultra.com/download/the-definitive-guide-to-netbeans-
platform-1st-edition-heiko-bock/
The Definitive Guide to NetBeans Platform 1st Edition
Heiko Böck (Auth.)
https://ebookultra.com/download/the-definitive-guide-to-netbeans-
platform-1st-edition-heiko-bock-auth/
Programming Wireless Devices with the Java 2 Platform 2nd
Edition Roger Riggs
https://ebookultra.com/download/programming-wireless-devices-with-the-
java-2-platform-2nd-edition-roger-riggs/
History in the Vernacular 1. paperback print. Edition
Raziuddin Aquil
https://ebookultra.com/download/history-in-the-vernacular-1-paperback-
print-edition-raziuddin-aquil/
NetBeans The Definitive Guide 1st Edition Tim Boudreau
https://ebookultra.com/download/netbeans-the-definitive-guide-1st-
edition-tim-boudreau/
The Client First Edition John Grisham
https://ebookultra.com/download/the-client-first-edition-john-grisham/
20 Recipes for Programming PhoneGap Cross Platform Mobile
Development for Android and iPhone 1st Edition Munro
https://ebookultra.com/download/20-recipes-for-programming-phonegap-
cross-platform-mobile-development-for-android-and-iphone-1st-edition-
munro/
Philosophy and German literature 1700 1990 1. pbk. print
Edition Saul
https://ebookultra.com/download/philosophy-and-german-
literature-1700-1990-1-pbk-print-edition-saul/
Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach
Rich client programming plugging into the NetBeans
Platform 1. print Edition Tulach Digital Instant
Download
Author(s): Tulach, Jaroslav; Boudreau, Tim; Wielenga, Geertjan
ISBN(s): 9780132354806, 0132354802
Edition: 1. print
File Details: PDF, 5.69 MB
Year: 2007
Language: english
Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach
Rich Client Programming
This page intentionally left blank
This page intentionally left blank
Rich Client Programming
Plugging into the NetBeansTM
Platform
Tim Boudreau
Jaroslav Tulach
Geertjan Wielenga
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York • Toronto • Montreal • London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Copyright © 2007 Sun Microsystems, Inc.
4150 Network Circle, Santa Clara, California 95054 U.S.A.
All rights reserved.
Sun Microsystems, Inc. has intellectual property rights relating to implementations of the technology described in this
publication. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents,
foreign patents, or pending applications.
Sun, Sun Microsystems, the Sun logo, NetBeans, J2EE, and all Sun and Java based trademarks and logos are trademarks or
registered trademarks of Sun Microsystems, Inc., in the United States and other countries. UNIX is a registered trademark in
the United States and other countries, exclusively licensed through X/Open Company, Ltd.
THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL
INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION
HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN
MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)AND/OR THE
PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
This Book Is Safari Enabled
The Safari Enabled icon on the cover of your favorite technology book means the book is available through
Safari Bookshelf. When you buy this book, you get free access to the online edition for 45 days.
Safari Bookshelf is an electronic reference library that lets you easily search thousands of technical books, find code samples,
download chapters, and access technical information whenever and wherever you need it.
To gain 45-day Safari Enabled access to this book:
• Go to http://www.prenhallprofessional.com/safarienabled
• Complete the brief registration form
• Enter the coupon code 32IE-M6EH-YU9W-QRHE-V51D
If you have difficulty registering on Safari Bookshelf or accessing the online edition, please e-mail
customer-service@safaribooksonline.com.
Visit us on the Web: www.prenhallprofessional.com
Library of Congress Cataloging-in-Publication Data
Boudreau, Tim.
Rich client programming : plugging into the NetBeans platform / Tim Boudreau, Jaroslav Tulach, Geertjan Wielenga.
p. cm.
Includes bibliographical references and index.
ISBN 0-13-235480-2 (pbk. : alk. paper)
1. Java (Computer program language) 2. Computer programming. I. Tulach, Jaroslav. II. Wielenga, Geertjan. III. Title.
QA76.73.J38B672 2007
005.13'3--dc22___________________________________2007007068
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must
be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any
form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions,
write to:
Pearson Education, Inc.
Rights and Contracts Department
One Lake Street
Upper Saddle River, NJ 07458
Fax: (201) 236-3290
ISBN 0-13-235480-2
Text printed in the United States on recycled paper at Courier in Stoughton, Massachusetts.
First printing, April 2007
Foreword by Jonathan Schwartz xv
Foreword by Jan Chalupa xvii
Preface xix
About the Authors and Contributors xxvii
Acknowledgments xxxi
Chapter One Getting Started with the NetBeans Platform 1
Setting Up the IDE 1
1.1
NetBeans IDE Basics 3
1.2
Creating a Module 3
1.2.1
Creating an Application 4
1.2.2
Using File Templates 6
1.2.3
Declaring Dependencies 7
1.2.4
Running a Module 8
1.2.5
Branding an Application 8
1.2.6
Distributing an Application 9
1.2.7
Chapter Two The Benefits of Modular Programming 11
Distributed Development 11
2.1
Modular Applications 13
2.2
Contents
v
Versioning 13
2.2.1
Secondary Versioning Information 14
2.2.2
Dependency Management 15
2.2.3
A Modular Programming Manifesto 15
2.3
Using NetBeans to Do Modular Programming 19
2.4
Chapter Three Modular Architecture 23
Modules—The Assembly Units of a Modular Application 23
3.1
Types of Modules 24
3.2
End-User Interface Module 24
3.2.1
Simple Library 25
3.2.2
Multiple Vendor Support 26
3.2.3
Modular Library 27
3.2.4
Module Lifecycle 29
3.3
Groups of Modules 33
3.4
Chapter Four Loosely Coupled Communication 39
Registration and Discovery 39
4.1
MetaInf Services 41
4.2
The Global Lookup 43
4.3
Writing an Extension Point 46
4.4
Chapter Five Lookup 49
Objects That Own Lookups 53
5.1
Lookup as a Communication Mechanism 55
5.2
Lookups and Proxying 58
5.3
Lookup and Selection 62
5.4
Writing Lookup-Sensitive Actions 63
5.5
Tracking the Global Selection 64
5.6
Legacy Variants of the Lookup Pattern in NetBeans APIs 65
5.7
Common Lookup Patterns 66
5.8
Chapter Six Filesystems 69
FileSystems and FileObjects 70
6.1
What Kinds of FileSystems Will I Be Dealing With? 71
6.2
Layering 72
6.3
XML Filesystems 73
6.4
Contents
vi
Declarative Registration II: The System Filesystem 74
6.5
How the System Filesystem Works 75
6.5.1
The System Filesystem Is Read/Write 76
6.5.2
Using FileChangeEvents from the System Filesystem 77
6.5.3
Exploring the System Filesystem—Menus 78
6.5.4
Getting from FileObjects to Java Objects 88
6.6
Using Factory Methods to Create Objects from .instance Files 90
6.6.1
Programmatic Access to the System Filesystem 93
6.6.2
Using .settings Files 94
6.6.3
Browsing the System Filesystem 96
6.7
Conclusions 96
6.8
Commonly Used Folders in the System Filesystem 96
6.8.1
Chapter Seven Threading, Listener Patterns, and MIME Lookup 103
Creating the Modules and SPI 104
7.1
Implementing ListModelProvider 107
7.2
Setting Up Dependencies 107
7.2.1
Creating XmlListModelProvider 109
7.2.2
Registering XmlListModelProvider 123
7.2.3
Providing a UI Component 123
7.3
The MIME Lookup SPI and API 124
7.3.1
Providing a Window Component to Show List Models 125
7.3.2
Using the Pseudo Navigator 132
7.4
Conclusion: PseudoNavigator—What’s Wrong with This Picture? 132
7.5
Chapter Eight The Window System 135
What the Window System Does 137
8.1
Classes in the Window System API 139
8.2
Using TopComponent 141
8.3
Persisting State across Sessions 145
8.4
Window System Persistence Modes 147
8.4.1
Window System Persistence Data 147
8.5
Creating Editor-Style (Nondeclarative) TopComponents 152
8.6
Opening Your Component Somewhere Else 153
8.6.1
Advanced Window System Configuration: Defining Your Own Modes 153
8.7
Using TopComponent Groups 158
8.8
Opening a Component Group Programmatically 161
8.8.1
vii
Contents
Chapter Nine Nodes, Explorer Views, Actions, and Presenters 163
The Nodes API 164
9.1
Using the Nodes API 167
9.1.1
The Explorer API 177
9.2
Types of Explorer View Components 177
9.2.1
Creating a TopComponent to Display Nodes 179
9.2.2
Adding a Detail View 182
9.2.3
Adding Another Detail View Using the Explorer API 184
9.2.4
Actions 190
9.3
Presenters 192
9.3.1
The Actions API and Standard NetBeans Actions 195
9.3.2
Installing Global Actions in Menus, Toolbars, and Keyboard
Shortcuts 196
9.3.3
Context-Aware Actions 197
9.3.4
Node Properties 199
9.4
Nodes and DataObjects: Creating a System Filesystem Browser 203
9.5
Epilogue: Of Nodes, Property Sheets, and User Interface Design 205
9.6
Chapter Ten DataObjects and DataLoaders 207
DataObjects: Where Do They Come From? 210
10.1
Adding Support for a New File Type 212
10.2
Adding Support for Manifest Files to NetBeans 212
10.2.1
Providing a Manifest Object from Manifest Files 218
10.2.2
Providing ManifestProvider from ManifestDataObject and
ManifestDataNode 219
10.2.3
Icon Badging 223
10.2.4
Testing ManifestDataObject with JUnit 228
10.2.5
Using Custom File Types Internally 234
10.3
Serialized Objects and the System Filesystem 235
10.4
Chapter Eleven Graphical User Interfaces 237
Introduction 237
11.1
Creating a New GUI Form 240
11.2
Placing and Aligning a Component in a Form 240
11.3
Setting Component Size and Resizability 242
11.4
Specifying Component Behavior and Appearance 244
11.5
Generating Event Listening and Handling Methods 244
11.6
Contents
viii
Customizing Generated Code 247
11.7
Building an Explorer View Visually 249
11.8
Previewing a Form 250
11.9
Using Custom Beans in the Form Editor 250
11.10
Using Different Layout Managers 251
11.11
Chapter Twelve Multiview Editors 253
Introduction 253
12.1
Getting Started 255
12.2
Understanding Multiview Editors 256
12.3
Creating the Editor’s Infrastructure 257
12.4
Creating the Source View 261
12.5
Describing a Source MultiViewElement 261
12.5.1
Creating a Source Editor 263
12.5.2
Adding the Source View to the Multiview Editor 267
12.5.3
Creating the Visual View 269
12.6
Adding a Visual View to the Multiview Editor 269
12.6.1
Finishing the Sample 271
12.7
Chapter Thirteen Syntax Highlighting 273
Introduction 273
13.1
Preparing to Create Syntax Highlighting 274
13.2
Creating Token IDs 275
13.3
Creating a Lexical Analyzer 277
13.4
Extending the Options Window 281
13.5
Registering the Syntax Highlighting in the Layer File 284
13.6
Finishing Up 286
13.7
Chapter Fourteen Code Completion 287
Introduction 287
14.1
Understanding Code Completion 289
14.2
Code Completion Query Types 291
14.3
Preparing to Work with the CompletionProvider Interface 291
14.4
Implementing a CompletionProvider 293
14.5
Implementing a CompletionItem 296
14.6
Adding a Filter to the CompletionProvider 300
14.7
ix
Contents
Adding Documentation to the Code Completion Box 304
14.8
Adding a Tooltip to the Code Completion Box 305
14.9
Chapter Fifteen Component Palettes 307
Introduction 307
15.1
Understanding the Component Palette 308
15.1.1
Creating Your First Palette 311
15.1.2
Adding Items to a Palette 313
15.2
Adding Items to Your First Palette 314
15.2.1
Letting the User Add Items to the Palette 321
15.2.2
Dragging and Dropping Palette Items 323
15.3
Defining a Drop Target 325
15.3.1
Defining a Drag Image 326
15.3.2
Defining a Drop Event 328
15.3.3
Defining a Drag Gesture 330
15.3.4
Adding Supporting Features to a Palette 331
15.4
Adding Actions to the Palette 332
15.4.1
Adding a Filter and Refreshing the Palette 335
15.4.2
Adding a Property Change Listener 338
15.4.3
Setting Palette Attributes 339
15.4.4
Providing a Palette Manager 341
15.4.5
Creating a Palette for a Text-Based Editor 344
15.5
Associating a Palette with a Text-Based Editor 344
15.5.1
Adding Items to a Text-Based Editor’s Palette 347
15.5.2
Formatting Dropped Items in a Text-Based Editor 350
15.5.3
Letting the User Add Items to a Text-Based Editor’s Palette 351
15.5.4
Chapter Sixteen Hyperlinks 355
Introduction 355
16.1
Preparing to Provide Hyperlinks 356
16.1.1
The HyperlinkProvider Class 356
16.1.2
Getting Started Really Quickly 356
16.1.3
Preparing to Work with the HyperlinkProvider Class 357
16.2
Hyperlinks in Manifest Files 359
16.3
Identifying Hyperlinks 360
16.3.1
Setting the Length of a Hyperlink 361
16.3.2
Opening the Referenced Document 362
16.3.3
Finishing Up 364
16.3.4
Contents
x
Chapter Seventeen Annotations 367
Introduction 367
17.1
Preparing to Create an Error Annotation 368
17.2
Creating an Error Annotation 368
17.3
Understanding the Error Annotation DTD 370
17.3.1
Registering an Error Annotation 375
17.3.2
Installing an Error Annotation 376
17.3.3
Preparing to Use an Error Annotation 376
17.4
Using an Error Annotation 377
17.5
Describing an Annotation 378
17.5.1
Attaching and Detaching Annotations 379
17.5.2
Defining a Request Processor Task 381
17.5.3
Annotating Part of a Line 382
17.5.4
Finishing Up 383
17.6
Chapter Eighteen Options Windows 385
Introduction 385
18.1
Your First Options Window Extension 385
18.1.1
Looking at the Options Window Extension Files 389
18.2
The AdvancedOption Class 389
18.2.1
The OptionsPanelController Class 390
18.2.2
The Visual Options Panels 392
18.2.3
Creating a Primary Panel 393
18.3
Your First Primary Panel 393
18.3.1
Reordering Options Panels 395
18.3.2
Adding Settings to the Options Window 396
18.4
Example: Using the Preferences API 396
18.4.1
Chapter Nineteen Web Frameworks 399
Introduction 399
19.1
Preparing to Provide Support for a Web Framework 400
19.1.1
The WebFrameworkProvider Class 401
19.1.2
Getting Started Really Quickly 402
19.1.3
Example: Basic Registration 402
19.1.4
Preparing to Work with the WebFrameworkProvider Class 404
19.2
Providing a Framework Configuration Panel 406
19.3
Creating the Configuration Panel 407
19.3.1
xi
Contents
Example: Adding a Configuration Panel to the
WebFrameworkProvider 410
19.3.2
Coding the Configuration Panel 411
19.3.3
Creating a Source Structure 413
19.4
Preparing to Use the extend() Method 414
19.4.1
Example: Defining the extend() Method 414
19.4.2
Creating Templates 416
19.4.3
A Template for Creating a Java File 416
19.4.4
Preparing to Use a Template to Programmatically Create a Java File
417
19.4.5
Using a Template to Programmatically Create a Java File 419
19.4.6
Trying Out the Framework Support Module 422
19.4.7
Letting the User Select a Library in the Frameworks Panel 423
19.5
Project Properties Dialog Box and Web Frameworks 424
19.6
Example: isInWebModule() Method 426
19.6.1
Finishing Up 427
19.7
Chapter Twenty Web Services 429
Introduction 429
20.1
Creating and Testing a Web Service Client 430
20.2
Integrating the Web Service Client 435
20.3
Chapter Twenty-One JavaHelp Documentation 441
Creating a Help Set 442
21.1
Adding New Help Topics 445
21.1.1
Removing the IDE’s Help Sets 446
21.2
Branding the Help Set’s Default Texts 449
21.3
Chapter Twenty-Two Update Centers 453
Introduction 453
22.1
Adding the IDE’s Update Center Functionality 454
22.2
Creating and Distributing an Autoupdate Descriptor 456
22.3
Using the IDE to Create an Autoupdate Descriptor 456
22.3.1
Uploading the Autoupdate Descriptor and NBM Files 457
22.3.2
Distributing the URL to the Autoupdate Descriptor 458
22.4
Generating a Module for Registering an Autoupdate Descriptor 459
22.4.1
Making the User Manually Register an Autoupdate Descriptor 460
22.4.2
Contents
xii
Downloading NBM Files from an Update Center 461
22.5
Publishing Updates to Existing Modules 462
22.6
Chapter Twenty-Three Use Case 1: Jens Trapp on NetBeans Module
Development 463
Introduction 463
23.1
Calling the External Tool 465
23.2
Creating the Tidy Error Check Action 465
23.2.1
Retrieving the Filename 468
23.2.2
Running HTML Tidy 469
23.2.3
Resolving Dependencies 473
23.2.4
Running the Example 473
23.2.5
Handling the Output 476
23.3
Printing the Output 476
23.3.1
Listening to the Output 479
23.3.2
Parsing the Output 481
23.3.3
Annotating Errors in the Source Editor 484
23.3.4
Configuring the Tool 491
23.4
Extending the Options Window 491
23.4.1
Persisting the Options 494
23.4.2
Formatting and Converting Files 496
23.5
Manipulating Files 497
23.5.1
Seeing the Difference 504
23.5.2
Controlling the Conversion 505
23.6
Creating the Wizard 505
23.6.1
Connecting the Wizard 517
23.6.2
Chapter Twenty-Four Use Case 2: Rich Unger on Application
Development 521
Introduction 521
24.1
Getting Started 522
24.2
Creating Support for the audio/wav MIME Type 526
24.3
Encapsulating Audio Data in the WavDataObject 530
24.4
Creating a Component for Viewing WAV Files 533
24.5
Converting WAV Editor to Multiview 535
24.6
Creating an API for Plugging in Additional Views 542
24.7
Implementing Your Own API to Provide a New View 544
24.8
xiii
Contents
Appendix A Advanced Module System Techniques 551
Hiding Implementation Details 551
A.1
Design for Extensibility 553
A.2
Splitting API and Implementation 555
A.3
Do I Really Need Cyclic Dependency? 559
A.4
Crossing the Informational Divide 563
A.5
Restricting Access to Friends 565
A.6
Having Public as Well as Friend API 566
A.7
A Final Word on Modularity 568
A.8
Appendix B Common Idioms and Code Patterns in NetBeans 569
Things You Do Differently in NetBeans Than in Plain Swing Code 569
B.1
Things That Represent Files 571
B.2
Working with Lookup 573
B.3
Projects 573
B.4
Appendix C Performance 575
Responsiveness versus Performance 577
C.1
Performance Tips for Module Authors 578
C.2
Writing Modules That Are Good Citizens 579
C.3
Index 583
Contents
xiv
Exploring the Variety of Random
Documents with Different Content
CHAPTER XVII.
LYDIANS. — MEDES. — CIMMERIANS. —
SCYTHIANS.
The early relations between the Lydians and the Asiatic Greeks,
anterior to the reign of Gygês, are not better known to us than those
of the Phrygians. Their native music became partly incorporated with
the Greek, as the Phrygian music was; to which it was very
analogous, both in instruments and in character, though the Lydian
mode was considered by the ancients as more effeminate and
enervating. The flute was used alike by Phrygians and Lydians,
passing from both of them to the Greeks; but the magadis or pectis
(a harp with sometimes as many as twenty strings, sounded two
together in octave) is said to have been borrowed by the Lesbian
Terpander from the Lydian banquets.[416] The flute-players who
acquired esteem among the early Asiatic Greeks were often Phrygian
or Lydian slaves; and even the poet Alkman, who gained for himself
permanent renown among the Greek lyric poets, though not a slave
born at Sardis, as is sometimes said, was probably of Lydian
extraction.
It has been already mentioned that Homer knows nothing of
Lydia or Lydians. He names Mæonians in juxtaposition with Karians,
and we are told by Herodotus that the people once called Mæonian
received the new appellation of Lydian from Lydus son of Atys.
Sardis, whose almost inexpugnable citadel was situated on a
precipitous rock on the northern side of the ridge of Tmôlus,
overhanging the plain of the river Hermus, was the capital of the
Lydian kings: it is not named by Homer, though he mentions both
Tmôlus and the neighboring Gygæan lake: the fortification of it was
ascribed to an old Lydian king named Mêlês, and strange legends
were told concerning it.[417] Its possessors were enriched by the
neighborhood of the river Paktôlus, which flowed down from Mount
Tmôlus towards the Hermus, and brought with it considerable
quantities of gold in its sands. To this cause historians often ascribe
the abundant treasure belonging to Crœsus and his predecessors;
but Crœsus possessed, besides, other mines near Pergamus;[418]
and another cause of wealth is also to be found in the general
industry of the Lydian people, which the circumstances mentioned
respecting them seem to attest. They were the first people,
according to Herodotus, who ever carried on retail trade; and the
first to coin money of gold and silver.[419]
The archæologists of Sardis in the time of Herodotus, a century
after the Persian conquest, carried very far back the antiquity of the
Lydian monarchy, by means of a series of names which are in great
part, if not altogether, divine and heroic. Herodotus gives us first,
Manês, Atys, and Lydus,—next, a line of kings beginning with
Hêraklês, twenty-two in number, succeeding each other from father
to son and lasting for 505 years. The first of this line of Herakleid
kings was Agrôn, descended from Hêraklês in the fourth generation,
—Hêraklês, Alkæus, Ninus, Bêlus, and Agrôn. The twenty-second
prince of this Herakleid family, after an uninterrupted succession of
father and son during 505 years, was Kandaulês, called by the
Greeks Myrsilus the son of Myrsus: with him the dynasty ended, and
ended by one of those curious incidents which Herodotus has
narrated with his usual dramatic, yet unaffected, emphasis. It was
the divine will that Kandaulês should be destroyed, and he lost his
rational judgment: having a wife the most beautiful woman in Lydia,
his vanity could not be satisfied without exhibiting her naked person
to Gygês son of Daskylus, his principal confidant and the
commander of his guards. In spite of the vehement repugnance of
Gygês, this resolution was executed; but the wife became aware of
the inexpiable affront, and took her measures to avenge it.
Surrounded by her most faithful domestics, she sent for Gygês, and
addressed him: “Two ways are now open to thee, Gygês: take which
thou wilt. Either kill Kandaulês, wed me, and acquire the kingdom of
Lydia,—or else thou must at once perish. For thou hast seen
forbidden things, and either thou, or the man who contrived it for
thee must die.” Gygês in vain entreated to be spared so terrible an
alternative: he was driven to the option, and he chose that which
promised safety to himself.[420] The queen planted him in ambush
behind the bed-chamber door, in the very spot where Kandaulês had
placed him as a spectator, and armed him with a dagger, which he
plunged into the heart of the sleeping king.
Thus ended the dynasty of the Herakleids; but there was a large
party in Lydia who indignantly resented the death of Kandaulês, and
took arms against Gygês. A civil war ensued, which both parties at
length consented to terminate by reference to the Delphian oracle.
The decision of that holy referee was given in favor of Gygês, and
the kingdom of Lydia thus passed to his dynasty, called the
Mermnadæ. But the oracle accompanied its verdict with an
intimation, that in the person of the fifth descendant of Gygês, the
murder of Kandaulês would be avenged,—a warning of which,
Herodotus innocently remarks, no one took any notice, until it was
actually fulfilled in the person of Crœsus.[421]
In this curious legend, which marks the commencement of the
dynasty called Mermnadæ, the historical kings of Lydia,—we cannot
determine how much, or whether any part, is historical. Gygês was
probably a real man, contemporary with the youth of the poet
Archilochus; but the name Gygês is also an heroic name in Lydian
archæology. He is the eponymus of the Gygæan lake near Sardis;
and of the many legends told respecting him, Plato has preserved
one, according to which Gygês is a mere herdsman of the king of
Lydia: after a terrible storm and earthquake, he sees near him a
chasm in the earth, into which he descends and finds a vast horse of
brass, hollow and partly open, wherein there lies a gigantic corpse
with a golden ring. This ring he carries away, and discovers
unexpectedly that it possesses the miraculous property of rendering
him invisible at pleasure. Being sent on a message to the king, he
makes the magic ring available to his ambition: he first possesses
himself of the person of the queen, then with her aid assassinates
the king, and finally seizes the sceptre.[422]
The legend thus recounted by Plato, different in almost all points
from the Herodotean, has this one circumstance in common, that
the adventurer Gygês, through the favor and help of the queen,
destroys the king and becomes his successor. Feminine preference
and patronage is the cause of his prosperity. Klausen has shown[423]
that this “aphrodisiac influence” runs in a peculiar manner through
many of the Asiatic legends, both divine and heroic. The Phrygian
Midas, or Gordius, as before recounted, acquires the throne by
marriage with a divinely privileged maiden: the favor shown by
Aphroditê to Anchisês, confers upon the Æneadæ sovereignty in the
Troad: moreover, the great Phrygian and Lydian goddess Rhea or
Cybelê has always her favored and self-devoting youth Atys, who is
worshipped along with her, and who serves as a sort of mediator
between her and mankind. The feminine element appears
predominant in Asiatic mythes: Midas, Sardanapalus, Sandôn, and
even Hêraklês,[424] are described as clothed in women’s attire and
working at the loom; while on the other hand the Amazons and
Semiramis achieve great conquests.
Admitting therefore the historical character of the Lydian kings
called Mermnadæ, beginning with Gygês about 715-690 B. C., and
ending with Crœsus, we find nothing but legend to explain to us the
circumstances which led to their accession. Still less can we make
out anything respecting the preceding kings, or determine whether
Lydia was ever in former times connected with or dependent upon
the kingdom of Assyria, as Ktêsias affirmed.[425] Nor can we certify
the reality or dates of the old Lydian kings named by the native
historian Xanthus,—Alkimus, Kamblês, Adramytês.[426] One piece of
valuable information, however, we acquire from Xanthus,—the
distribution of Lydia into two parts, Lydia proper and Torrhêbia,
which he traces to the two sons of Atys,—Lydus and Torrhêbus; he
states that the dialect of the Lydians and Torrhebians differed much
in the same degree as that of Doric and Ionic Greeks.[427] Torrhêbia
appears to have included the valley of the Kaïster, south of Tmôlus,
and near to the frontiers of Karia.
With Gygês, the Mermnad king, commences the series of
aggressions from Sardis upon the Asiatic Greeks, which ultimately
ended in their subjection. Gygês invaded the territories of Milêtus
and Smyrna, and even took the city, probably not the citadel, of
Kolophôn. Though he thus, however, made war upon the Asiatic
Greeks, he was munificent in his donations to the Grecian god of
Delphi, and his numerous as well as costly offerings were seen in the
temple by Herodotus. Elegiac compositions of the poet Mimnermus
celebrated the valor of the Smyrnæans in their battle with Gygês.
[428] We hear also, in a story which bears the impress of Lydian more
than of Grecian fancy, of a beautiful youth of Smyrna named
Magnês, to whom Gygês was attached, and who incurred the
displeasure of his countrymen for having composed verses in
celebration of the victories of the Lydians over the Amazons. To
avenge the ill-treatment received by this youth, Gygês attacked the
territory of Magnêsia (probably Magnêsia on Sipylus) and after a
considerable struggle took the city.[429]
How far the Lydian kingdom of Sardis extended during the reign
of Gygês, we have no means of ascertaining. Strabo alleges that the
whole Troad[430] belonged to him, and that the Greek settlement of
Abydus on the Hellespont was established by the Milesians only
under his auspices. On what authority this statement is made, we
are not told, and it appears doubtful, especially as so many
legendary anecdotes are connected with the name of Gygês. This
prince reigned (according to Herodotus) thirty-eight years, and was
succeeded by his son Ardys, who reigned forty-nine years (about B. C.
678-629). We learn that he attacked the Milesians, and took the
Ionic city of Priênê, but this possession cannot have been
maintained, for the city appears afterwards as autonomous.[431] His
long reign, however, was signalized by two events, both of
considerable moment to the Asiatic Greeks; the invasion of the
Cimmerians,—and the first approach to collision, at least the first of
which we have any historical knowledge, between the inhabitants of
Lydia and those of Upper Asia under the Median kings.
It is affirmed by all authors that the Medes were originally
numbered among the subjects of the great Assyrian empire, of
which Nineveh—or Ninos, as the Greeks call it—was the chief town,
and Babylon one of the principal portions. That the population and
power of these two great cities, as well as of several others which
the Ten Thousand Greeks in their march found ruined and deserted
in those same regions, is of high antiquity,[432] there is no room for
doubting; but it is noway incumbent upon a historian of Greece to
entangle himself in the mazes of Assyrian chronology, or to weigh
the degree of credit to which the conflicting statements of
Herodotus, Ktêsias, Berosus, Abydênus, etc. are entitled. With the
Assyrian empire,[433]—which lasted, according to Herodotus, five
hundred and twenty years, according to Ktêsias, thirteen hundred
and sixty years,—the Greeks have no ascertainable connection: the
city of Nineveh appears to have been taken by the Medes a little
before the year 600 B. C. (in so far as the chronology can be made
out), and exercised no influence upon Grecian affairs. Those
inhabitants of Upper Asia, with whom the early Greeks had relation,
were the Medes, and the Assyrians or Chaldæans of Babylon,—both
originally subject to the Assyrians of Nineveh,—both afterwards
acquiring independence,—and both ultimately embodied in the
Persian empire. At what time either of them became first
independent, we do not know:[434] the astronomical canon which
gives a list of kings of Babylon, beginning with what is called the era
of Nabonassar, or 747 B. C., does not prove at what epoch these
Babylonian chiefs became independent of Nineveh: and the
catalogue of Median kings, which Herodotus begins with Dêïokês,
about 709-711 B. C., is commenced by Ktêsias more than a century
earlier,—moreover, the names in the two lists are different almost
from first to last.
For the historian of Greece, the Medes first begin to acquire
importance about 656 B. C., under a king whom Herodotus calls
Phraortês, son of Dêïokês. Respecting Dêïokês himself, Herodotus
recounts to us how he came to be first chosen king.[435] The seven
tribes of Medes dwelt dispersed in separate villages, without any
common authority, and the mischiefs of anarchy were painfully felt
among them: Dêïokês having acquired great reputation in his own
village as a just man, was invoked gradually by all the adjoining
villages to settle their disputes. As soon as his efficiency in this
vocation, and the improvement which he brought about, had
become felt throughout all the tribes, he artfully threw up his post
and retired again into privacy,—upon which the evils of anarchy
revived in a manner more intolerable than before. The Medes had
now no choice except to elect a king,—the friends of Dêïokês
expatiated warmly upon his virtues, and he was the person chosen.
[436] The first step of the new king was to exact from the people a
body of guards selected by himself; next, he commanded them to
build the city of Ekbatana, upon a hill surrounded with seven
concentric circles of walls, his own palace being at the top and in the
innermost. He farther organized the scheme of Median despotism;
the king, though his person was constantly secluded in his fortified
palace, inviting written communications from all aggrieved persons,
and administering to each the decision or the redress which it
required,—informing himself, moreover, of passing events by means
of ubiquitous spies and officials, who seized all wrong-doers and
brought them to the palace for condign punishment. Dêïokês farther
constrained the Medes to abandon their separate abodes and
concentrate themselves in Ekbatana, from whence all the powers of
government branched out; and the seven distinct fortified circles in
the town, coinciding as they do with the number of the Median
tribes, were probably conceived by Herodotus as intended each for
one distinct tribe,—the tribe of Dêïokês occupying the innermost
along with himself.[437]
Except the successive steps of this well-laid political plan, we
hear of no other acts ascribed to Dêïokês: he is said to have held the
government for fifty-three years, and then dying, was succeeded by
his son Phraortês. Of the real history of Dêïokês, we cannot be said
to know anything. For the interesting narrative of Herodotus, of
which the above is an abridgment, presents to us in all its points
Grecian society and ideas, not Oriental: it is like the discussion which
the historian ascribes to the seven Persian conspirators, previous to
the accession of Darius,—whether they shall adopt an oligarchical, a
democratical, or a monarchical form of government;[438] or it may be
compared, perhaps more aptly still, to the Cyropædia of Xenophon,
who beautifully and elaborately works out an ideal which Herodotus
exhibits in brief outline. The story of Dêïokês describes what may be
called the despot’s progress, first as candidate, and afterwards as
fully established. Amidst the active political discussion carried on by
intelligent Greeks in the days of Herodotus, there were doubtless
many stories of the successful arts of ambitious despots, and much
remark as to the probable means conducive to their success, of a
nature similar to those in the Politics of Aristotle: one of these tales
Herodotus has employed to decorate the birth and infancy of the
Median monarchy. His Dêïokês begins like a clever Greek among
other Greeks, equal, free, and disorderly. He is athirst for despotism
from the beginning, and is forward in manifesting his rectitude and
justice, “as beseems a candidate for command;”[439] he passes into
a despot by the public vote, and receives what to the Greeks was
the great symbol and instrument of such transition, a personal body-
guard; he ends by organizing both the machinery and the etiquette
of a despotism in the Oriental fashion, like the Cyrus of Xenophon,
[440] only that both these authors maintain the superiority of their
Grecian ideal over Oriental reality by ascribing both to Dêïokês and
Cyrus a just, systematic, and laborious administration, such as their
own experience did not present to them in Asia. Probably Herodotus
had visited Ekbatana (which he describes and measures like an eye-
witness, comparing its circuit to that of Athens), and there heard
that Dêïokês was the builder of the city, the earliest known Median
king, and the first author of those public customs which struck him
as peculiar, after the revolt from Assyria: the interval might then be
easily filled up, between Median autonomy and Median despotism,
by intermediate incidents, such as would have accompanied that
transition in the longitude of Greece. The features of these
inhabitants of Upper Asia, for a thousand years forward from the
time at which we are now arrived,—under the descendants of
Dêïokês, of Cyrus, of Arsakês, and of Ardshir,—are so unvarying,[441]
that we are much assisted in detecting those occasions in which
Herodotus or others infuse into their history indigenous Grecian
ideas.
Phraortês (658-636 B. C.), having extended the dominion of the
Medes over a large portion of Upper Asia, and conquered both the
Persians and several other nations, was ultimately defeated and slain
in a war against the Assyrians of Nineveh: who, though deprived of
their external dependencies, were yet brave and powerful by
themselves. His son Kyaxarês (636-595 B. C.) followed up with still
greater energy the same plans of conquest, and is said to have been
the first who introduced any organization into the military force;—
before his time, archers, spearmen, and cavalry had been
confounded together indiscriminately, until this monarch established
separate divisions for each. He extended the Median dominion to the
eastern bank of the Halys, which river afterwards, by the conquests
of the Lydian king Crœsus, became the boundary between the
Lydian and Median empires; and he carried on war for six years with
Alyattês king of Lydia, in consequence of the refusal of the latter to
give up a band of Scythian nomads, who, having quitted the territory
of Kyaxarês in order to escape severities with which they were
menaced, had sought refuge as suppliants in Lydia.[442] The war,
indecisive as respects success, was brought to its close by a
remarkable incident: in the midst of a battle between the Median
and Lydian armies, there happened a total eclipse of the sun, which
occasioned equal alarm to both parties, and induced them
immediately to cease hostilities.[443] The Kilikian prince Syennesis,
and the Babylonian prince Labynêtus, interposed their mediation,
and effected a reconciliation between Kyaxarês and Alyattês, one of
the conditions of which was, that Alyattês gave his daughter Aryênis
in marriage to Astyagês son of Kyaxarês. In this manner began the
connection between the Lydian and Median kings which afterwards
proved so ruinous to Crœsus. It is affirmed that the Greek
philosopher Thalês foretold this eclipse; but we may reasonably
consider the supposed prediction as not less apocryphal than some
others ascribed to him, and doubt whether at that time any living
Greek possessed either knowledge or scientific capacity sufficient for
such a calculation.[444] The eclipse itself, and its terrific working
upon the minds of the combatants, are facts not to be called in
question; though the diversity of opinion among chronologists,
respecting the date of it, is astonishing.[445]
It was after this peace with Alyattês, as far as we can make out
the series of events in Herodotus, that Kyaxarês collected all his
forces and laid siege to Nineveh, but was obliged to desist by the
unexpected inroad of the Scythians. Nearly at the same time that
Upper Asia was desolated by these formidable nomads, Asia Minor
too was overrun by other nomads,—the Cimmerians,—Ardys being
then king of Lydia; and the two invasions, both spreading extreme
disaster, are presented to us as indirectly connected together in the
way of cause and effect.
The name Cimmerians appears in the Odyssey,—the fable
describes them as dwelling beyond the ocean-stream, immersed in
darkness and unblessed by the rays of Helios. Of this people as
existent we can render no account, for they had passed away, or lost
their identity and become subject, previous to the commencement of
trustworthy authorities: but they seem to have been the chief
occupants of the Tauric Chersonesus (Crimea) and of the territory
between that peninsula and the river Tyras (Dniester), at the time
when the Greeks first commenced their permanent settlements on
those coasts in the seventh century B. C. The numerous localities
which bore their name, even in the time of Herodotus,[446] after they
had ceased to exist as a nation,—as well as the tombs of the
Cimmerian kings then shown near the Tyras,—sufficiently attest this
fact; and there is reason to believe that they were—like their
conquerors and successors the Scythians—a nomadic people, mare-
milkers, moving about with their tents and herds, suitably to the
nature of those unbroken steppes which their territory presented,
and which offered little except herbage in profusion. Strabo tells
us[447]—on what authority we do not know—that they, as well as the
Trêres and other Thracians, had desolated Asia Minor more than
once before the time of Ardys, and even earlier than Homer.
The Cimmerians thus belong partly to legend partly to history;
but the Scythians formed for several centuries an important section
of the Grecian contemporary world. Their name, unnoticed by
Homer, occurs for the first time in the Hesiodic poems. When the
Homeric Zeus in the Iliad turns his eye away from Troy towards
Thrace, he sees, besides the Thracians and Mysians, other tribes,
whose names cannot be made out, but whom the poet knows as
milk-eaters and mare-milkers;[448] and the same characteristic
attributes, coupled with that of “having wagons for their dwelling-
houses,” appear in Hesiod connected with the name of the
Scythians.[449] The navigation of the Greeks into the Euxine,
gradually became more and more frequent, and during the last half
of the seventh century B. C. their first settlements on its coasts were
established. The foundation of Byzantium, as well as of the Pontic
Herakleia, at a short distance to the east of the Thracian Bosphorus,
by the Megarians, is assigned to the 30th Olympiad, or 658 B. C.;[450]
and the succession of colonies founded by the enterprise of Milesian
citizens on the western coast of the Euxine, seem to fall not very
long after this date,—at least within the following century. Istria,
Tyras, and Olbia, or Borysthenes, were planted respectively near the
mouths of the three great rivers Danube, Dniester, and Bog: Kruni,
Odêssus, Tomi, Kallatis, and Apollonia, were also planted on the
south-western or Thracian coast, northward of the dangerous land of
Salmydessus, so frequent in wrecks, but south of the Danube.[451]
According to the turn of Grecian religious faith, the colonists took out
with them the worship of the hero Achilles (from whom, perhaps,
the œkist and some of the expatriating chiefs professed to be
descended), which they established with great solemnity both in the
various towns and on the small adjoining islands: and the earliest
proof which we find of Scythia, as a territory familiar to Grecian
ideas and feeling, is found in a fragment of the poet Alkæus (about
B. C. 600), wherein he addresses Achilles[452] as “sovereign of
Scythia.” There were, besides, several other Milesian foundations on
or near the Tauric Chersonese (Crimea) which brought the Greeks
into conjunction with the Scythians,—Herakleia, Chersonêsus, and
Theodosia, on the southern coast and south-western corner of the
peninsula,—Pantikapæum and the Teian colony of Phanagoria (these
two on the European and Asiatic sides of the Cimmerian Bosphorus
respectively), and Kêpi, Hermônassa, etc. not far from Phanagoria,
on the Asiatic coast of the Euxine: last of all, there was, even at the
extremity of the Palus Mæotis (Sea of Azof), the Grecian settlement
of Tanais.[453] All or most of these seem to have been founded
during the course of the sixth century B. C., though the precise dates
of most of them cannot be named; probably several of them anterior
to the time of the mystic poet Aristeas of Prokonnêsus, about 540
B. C. His long voyage from the Palus Mæotis (Sea of Azof) into the
interior of Asia as far as the country of the Issêdones (described in a
poem, now lost, called the Arimaspian verses), implies an habitual
intercourse between Scythians and Greeks which could not well have
existed without Grecian establishments on the Cimmerian
Bosphorus.
Hekatæus of Milêtus,[454] appears to have given much
geographical information respecting the Scythian tribes; but
Herodotus, who personally visited the town of Olbia, together with
the inland regions adjoining to it, and probably other Grecian
settlements in the Euxine (at a time which we may presume to have
been about 450-440 B. C.),—and who conversed with both Scythians
and Greeks competent to give him information,—has left us far more
valuable statements respecting the Scythian people, dominion, and
manners, as they stood in his day. His conception of the Scythians,
as well as that of Hippokratês, is precise and well-defined,—very
different from that of the later authors, who use the word almost
indiscriminately to denote all barbarous nomads. His territory, called
Scythia, is a square area, twenty days’ journey or four thousand
stadia (somewhat less than five hundred English miles) in each
direction,—bounded by the Danube (the course of which river he
conceives in a direction from N. W. to S. E.), the Euxine, and the
Palus Mæotis with the river Tanais, on three sides respectively,—and
on the fourth or north side by the nations called Agathyrsi, Neuri,
Androphagi, and Melanchlæni.[455] However imperfect his idea of the
figure of this territory may be found, if we compare it with a good
modern map, the limits which he gives us are beyond dispute: from
the lower Danube and the mountains eastward of Transylvania to
the lower Tanais, the whole area was either occupied by or subject
to the Scythians. And this name comprised tribes differing materially
in habits and civilization. The great mass of the people who bore it,
strictly nomadic in their habits,—neither sowing nor planting, but
living only on food derived from animals, especially mare’s milk and
cheese,—moved from place to place, carrying their families in
wagons covered with wicker and leather, themselves always on
horseback with their flocks and herds, between the Borysthenês and
the Palus Mæotis; they hardly even reached so far westward as the
Borysthenês, since a river (not easily identified) which Herodotus
calls Pantikapês, flowing into the Borysthenês from the eastward,
formed their boundary. These nomads were the genuine Scythians,
possessing the marked attributes of the race, and including among
their number the regal Scythians,[456]—hordes so much more
populous and more effective in war than the rest, as to maintain
undisputed ascendency, and to account all other Scythians no better
than their slaves. It was to these that the Scythian kings belonged,
by whom the religious and political unity of the name was
maintained,—each horde having its separate chief, and to a certain
extent separate worship and customs. But besides these nomads,
there were also agricultural Scythians, with fixed abodes, living more
or less upon bread, and raising corn for exportation, along the banks
of the Borysthenês and the Hypanis.[457] And such had been the
influence of the Grecian settlement of Olbia at the mouth of the
latter river in creating new tastes and habits, that two tribes on its
western banks, the Kallippidæ and the Alazônes, had become
completely accustomed both to tillage and to vegetable food, and
had in other respects so much departed from their Scythian
rudeness as to be called Hellenic-Scythians, many Greeks being
seemingly domiciled among them. Northward of the Alazônes, lay
those called the agricultural Scythians, who sowed corn, not for food
but for sale.[458]
Such stationary cultivators were doubtless regarded by the
predominant mass of the Scythians as degenerate brethren; and
some historians maintain that they belonged to a foreign race,
standing to the Scythians merely in the relation of subjects,[459]—an
hypothesis contradicted implicitly, if not directly, by the words of
Herodotus, and no way necessary in the present case. It is not from
them, however, that Herodotus draws his vivid picture of the people,
with their inhuman rites and repulsive personal features. It is the
purely nomadic Scythians whom he depicts, the earliest specimens
of the Mongolian race (so it seems probable)[460] known to history,
and prototypes of the Huns and Bulgarians of later centuries. The
sword, in the literal sense of the word, was their chief god,[461]—an
iron scymetar solemnly elevated upon a wide and lofty platform,
which was supported on masses of fagots piled underneath,—to
whom sheep, horses, and a portion of their prisoners taken in war,
were offered up in sacrifice: Herodotus treats this sword as the
image of the god Arês, thus putting an Hellenic interpretation upon
that which he describes literally as a barbaric rite. The scalps and
the skins of slain enemies, and sometimes the skull formed into a
drinking-cup, constituted the decoration of a Scythian warrior:
whoever had not slain an enemy, was excluded from participation in
the annual festival and bowl of wine prepared by the chief of each
separate horde. The ceremonies which took place during the
sickness and funeral obsequies of the Scythian kings (who were
buried at Gerrhi, at the extreme point to which navigation extended
up the Borysthenês), partook of the same sanguinary disposition. It
was the Scythian practice to put out the eyes of all their slaves; and
the awkwardness of the Scythian frame, often overloaded with fat,
together with extreme dirt of body, and the absence of all
discriminating feature between one man and another, complete the
brutish portrait.[462] Mare’s milk (with cheese made from it) seems to
have been their chief luxury, and probably served the same purpose
of procuring the intoxicating drink called kumiss, as at present
among the Bashkirs and the Kalmucks.[463]
If the habits of the Scythians were such as to create in the near
observer no other feeling than repugnance, their force at least
inspired terror. They appeared in the eyes of Thucydidês so
numerous and so formidable, that he pronounces them irresistible, if
they could but unite, by any other nation within his knowledge.
Herodotus, too, conceived the same idea of a race among whom
every man was a warrior and a practised horse-bowman, and who
were placed by their mode of life out of all reach of an enemy’s
attack.[464] Moreover, Herodotus does not speak meanly of their
intelligence, contrasting them in favorable terms with the general
stupidity of the other nations bordering on the Euxine. In this
respect Thucydidês seems to differ from him.
On the east, the Scythians of the time of Herodotus were
separated only by the river Tanais from the Sarmatians, who
occupied the territory for several days’ journey north-east of the
Palus Mæôtis: on the south, they were divided by the Danube from
the section of Thracians called Getæ. Both these nations were
nomadic, analogous to the Scythians in habits, military efficiency,
and fierceness: indeed, Herodotus and Hippokratês distinctly
intimate that the Sarmatians were nothing but a branch of
Scythians,[465] speaking a Scythian dialect, and distinguished from
their neighbors on the other side of the Tanais, chiefly by this
peculiarity,—that the women among them were warriors hardly less
daring and expert than the men. This attribute of Sarmatian women,
as a matter of fact, is well attested,—though Herodotus has thrown
over it an air of suspicion not properly belonging to it, by his
explanatory genealogical mythe, deducing the Sarmatians from a
mixed breed between the Scythians and the Amazons.
The wide extent of steppe eastward and north-eastward of the
Tanais, between the Ural mountains and the Caspian, and beyond
the possessions of the Sarmatians, was traversed by Grecian traders,
even to a good distance in the direction of the Altai mountains,—the
rich produce of gold, both in Altai and Ural, being the great
temptation. First, according to Herodotus, came the indigenous
nomadic nation called Budini, who dwelt to the northward of the
Sarmatians,[466] and among whom were established a colony of
Pontic Greeks, intermixed with natives, and called Gelôni; these
latter inhabited a spacious town built entirely of wood. Beyond the
Budini eastward dwelt the Thyssagetæ and the Jurkæ, tribes of
hunters, and even a body of Scythians who had migrated from the
territories of the regal Scythians. The Issêdones were the
easternmost people respecting whom any definite information
reached the Greeks; beyond them we find nothing but fable,[467]—
the one-eyed Arimaspians, the gold-guarding Grypes, or Griffins, and
the bald-headed Argippæi. It is impossible to fix with precision the
geography of these different tribes, or to do more than comprehend
approximatively their local bearings and relations to each other.
But the best known of all is the situation of the Tauri (perhaps a
remnant of the expelled Cimmerians), who dwelt in the southern
portion of the Tauric Chersonesus (or Crimea), and who immolated
human sacrifices to their native virgin goddess,—identified by the
Greeks with Artemis, and serving as a basis for the affecting legend
of Iphigeneia. The Tauri are distinguished by Herodotus from
Scythians,[468] but their manners and state of civilization seem to
have been very analogous. It appears also that the powerful and
numerous Massagetæ, who dwelt in Asia on the plains eastward of
the Caspian and southward of the Issêdones, were so analogous to
the Scythians as to be reckoned as members of the same race by
many of the contemporaries of Herodotus.[469]
This short enumeration of the various tribes near the Euxine and
the Caspian, as well as we can make them out, from the seventh to
the fifth century B. C., is necessary for the comprehension of that
double invasion of Scythians and Cimmerians which laid waste Asia
between 630 and 610 B. C. We are not to expect from Herodotus,
born a century and a half afterwards, any very clear explanations of
this event, nor were all his informants unanimous respecting the
causes which brought it about. But it is a fact perfectly within the
range of historical analogy, that accidental aggregations of number,
development of aggressive spirit, or failure in the means of
subsistence, among the nomadic tribes of the Asiatic plains, have
brought on the civilized nations of southern Europe calamitous
invasions, of which the prime moving cause was remote and
unknown. Sometimes a weaker tribe, flying before a stronger, has
been in this manner precipitated upon the territory of a richer and
less military population, so that an impulse originating in the distant
plains of Central Tartary has been propagated until it reached the
southern extremity of Europe, through successive intermediate
tribes, a phenomenon especially exhibited during the fourth and fifth
centuries of the Christian era, in the declining years of the Roman
empire. A pressure so transmitted onward is said to have brought
down the Cimmerians and Scythians upon the more southerly
regions of Asia. The most ancient story in explanation of this
incident seems to have been contained in the epic poem (now lost)
called Arimaspia, of the mystic Aristeas of Prokonnêsus, composed
apparently about 540 B. C. This poet, under the inspiration of Apollo,
[470] undertook a pilgrimage to visit the sacred Hyperboreans
(especial votaries of that god) in their elysium beyond the Rhipæan
mountains; but he did not reach farther than the Issêdones.
According to him, the movement, whereby the Cimmerians had been
expelled from their possessions on the Euxine sea, began with the
Grypes or Griffins in the extreme north,—the sacred character of the
Hyperboreans beyond was incompatible with aggression or
bloodshed. The Grypes invaded the Arimaspians, who on their part
assailed their neighbors the Issêdones;[471] these latter moved
southward or westward and drove the Scythians across the Tanais,
while the Scythians, carried forward by this onset, expelled the
Cimmerians from their territories along the Palus Mæotis and the
Euxine.
We see thus that Aristeas referred the attack of the Scythians
upon the Cimmerians to a distant impulse proceeding in the first
instance from the Grypes or Griffins; but Herodotus had heard it
explained in another way, which he seems to think more correct,—
the Scythians, originally occupants of Asia, or the regions east of the
Caspian, had been driven across the Araxês, in consequence of an
unsuccessful war with the Massagetæ, and precipitated upon the
Cimmerians in Europe.[472]
When the Scythian host approached, the Cimmerians were not
agreed among themselves whether to resist or retire: the majority of
the people were dismayed and wished to evacuate the territory,
while the kings of the different tribes resolved to fight and perish at
home. Those who were animated with this fierce despair, divided
themselves along with the kings into two equal bodies and perished
by each other’s hands near the river Tyras, where the sepulchres of
the kings were yet shown in the time of Herodotus.[473] The mass of
the Cimmerians fled and abandoned their country to the Scythians;
who, however, not content with possession of the country, followed
the fugitives across the Cimmerian Bosphorus from west to east,
under the command of their prince Madyês son of Protothyês. The
Cimmerians, coasting along the east of the Euxine sea and passing
to the west of Mount Caucasus, made their way first into Kolchis,
and next into Asia Minor, where they established themselves on the
peninsula on the northern coast, near the site of the subsequent
Grecian city of Sinôpê. But the Scythian pursuers, mistaking the
course taken by the fugitives, followed the more circuitous route
east of Mount Caucasus near to the Caspian sea;[474] which brought
them, not into Asia Minor, but into Media. Both Asia Minor and Media
became thus exposed nearly at the same time to the ravages of
northern nomades.
These two stories, representing the belief of Herodotus and
Aristeas, involve the assumption that the Scythians were
comparatively recent emigrants into the territory between the Ister
and the Palus Mæotis. But the legends of the Scythians themselves,
as well as those of the Pontic Greeks, imply the contrary of this
assumption; and describe the Scythians as primitive and indigenous
inhabitants of the country. Both legends are so framed as to explain
a triple division, which probably may have prevailed, of the Scythian
aggregate nationality, traced up to three heroic brothers: both also
agree in awarding the predominance to the youngest brother of the
three,[475] though in other respects, the names and incidents of the
two are altogether different, The Scythians call themselves Skoloti.
Such material differences, in the various accounts given to
Herodotus of the Scythian and Cimmerian invasions of Asia, are by
no means wonderful, seeing that nearly two centuries had elapsed
between that event and his visit to the Pontus. That the Cimmerians
—perhaps the northernmost portion of the great Thracian name, and
conterminous with the Getæ on the Danube—were the previous
tenants of much of the territory between the Ister and the Palus
Mæotis, and that they were expelled in the seventh century B. C., by
the Scythians, we may follow Herodotus in believing; but Niebuhr
has shown that there is great intrinsic improbability in his narrative
of the march of the Cimmerians into Asia Minor, and in the pursuit of
these fugitives by the Scythians. That the latter would pursue at all,
when an extensive territory was abandoned to them without
resistance, is hardly supposable: that they should pursue and
mistake their way, is still more difficult to believe: nor can we
overlook the great difficulties of the road and the Caucasian passes,
in the route ascribed to the Cimmerians.[476] Niebuhr supposes the
latter to have marched into Asia Minor by the western side of the
Euxine, and across the Thracian Bosphorus, after having been
defeated in a decisive battle by the Scythians near the river Tyras,
where their last kings fell and were interred.[477] Though this is both
an easier route, and more in accordance with the analogy of other
occupants expelled from the same territory, we must, in the absence
of positive evidence, treat the point as unauthenticated.
The inroad of the Cimmerians into Asia Minor was doubtless
connected with their expulsion from the northern coast of the Euxine
by the Scythians, but we may well doubt whether it was at all
connected, as Herodotus had been told that it was, with the invasion
of Media by the Scythians, except as happening near about the
same time. The same great evolution of Scythian power, or
propulsion by other tribes behind, may have occasioned both events,
—brought about by different bodies of Scythians, but nearly
contemporaneous.
Herodotus tells us two facts respecting the Cimmerian emigrants
into Asia Minor. They committed destructive, though transient,
ravages in many parts of Paphlagonia, Phrygia, Lydia, and Ionia,—
and they occupied permanently the northern peninsula,[478] whereon
the Greek city of Sinôpê was afterwards planted. Had the elegies of
the contemporary Ephesian poet Kallinus been preserved, we should
have known better how to appreciate these trying times: he strove
to keep alive the energy of his countrymen against the formidable
invaders.[479] From later authors, who probably, had these poems
before them, we learn that the Cimmerian host, having occupied the
Lydian chief town Sardis (its inaccessible acropolis defied them),
poured with their wagons into the fertile valley of the Kaïster, took
and sacked Magnêsia on the Mæander, and even threatened the
temple of Artemis at Ephesus. But the goddess so well protected her
own town and sanctuary,[480] that Lygdamis the leader of the
Cimmerians, whose name marks him for a Greek, after a season of
prosperous depredation in Lydia and Ionia, conducting his host into
the mountainous regions of Kilikia, was there overwhelmed and
slain. But though these marauders perished, the Cimmerian settlers
in the territory near Sinôpê remained; and Ambrôn, the first Milesian
œkist who tried to colonize that spot, was slain by them, if we may
believe Skymnus. They are not mentioned afterwards, but it seems
not unreasonable to believe that they appear under the name of the
Chalybes, whom Herodotus mentions along that coast between the
Mariandynians and Paphlagonians, and whom Mela notices as
adjacent to Sinôpê and Amisus.[481] Other authors place the
Chalybes on several different points, more to the east, though along
the same parallel of latitude,—between the Mosynœki and Tibarêni,
—near the river Thermôdôn,—and on the northern boundary of
Armenia, near the sources of the Araxês; but it is only Herodotus
and Mela who recognize Chalybes westward of the river Halys and
the Paphlagonians, near to Sinôpê. These Chalybes were brave
mountaineers, though savage in manners; distinguished as
producers and workers of the iron which their mountains afforded.
In the conceptions of the Greeks, as manifested in a variety of
fabulous notices, they are plainly connected with Scythians or
Cimmerians; whence it seems probable that this connection was
present to the mind of Herodotus in regard to the inland population
near Sinôpê.[482]
Herodotus seems to have conceived only one invasion of Asia by
the Cimmerians, during the reign of Ardys in Lydia. Ardys was
succeeded by his son Sadyattês, who reigned twelve years; and it
was Alyattês, son and successor of Sadyattês, according to
Herodotus, who expelled the Cimmerians from Asia.[483] But Strabo
seems to speak of several invasions, in which the Trêres, a Thracian
tribe, were concerned, and which are not clearly discriminated; while
Kallisthenês affirmed that Sardis had been taken by the Trêres and
Lykians.[484] We see only that a large and fair portion of Asia Minor
was for much of this seventh century B. C. in possession of these
destroying nomads, who, while on the one hand they afflicted the
Ionic Greeks, on the other hand indirectly befriended them by
retarding the growth of the Lydian monarchy.
The invasion of Upper Asia by the Scythians appears to have
been nearly simultaneous with that of Asia Minor by the Cimmerians,
but more ruinous and longer protracted. The Median king Kyaxarês,
called away from the siege of Nineveh to oppose them, was totally
defeated; and the Scythians became full masters of the country.
They spread themselves over the whole of Upper Asia, as far as
Palestine and the borders of Egypt, where Psammetichus the
Egyptian king met them, and only redeemed his kingdom from
invasion by prayers and costly presents. In their return, a
detachment of them sacked the temple of Aphroditê at Askalon; an
act of sacrilege which the goddess avenged both upon the
plunderers and their descendants, to the third and fourth generation.
Twenty-eight years did their dominion in Upper Asia continue,[485]
with intolerable cruelty and oppression; until, at length, Kyaxarês
and the Medes found means to entrap the chiefs into a banquet, and
slew them in the hour of intoxication. The Scythian host once
expelled, the Medes resumed their empire. Herodotus tells us that
these Scythians returned to the Tauric Chersonese, where they
found that, during their long absence, their wives had intermarried
with the slaves, while the new offspring which had grown up refused
to readmit them. A deep trench had been drawn across a line[486]
over which their march lay, and the new-grown youth defended it
with bravery, until at length,—so the story runs,—the returning
masters took up their whips instead of arms, and scourged the
rebellious slaves into submission.
Little as we know about the particulars of these Cimmerian and
Scythian inroads, they deserve notice as the first—at least the first
historically known—among the numerous invasions of cultivated Asia
and Europe by the nomads of Tartary. Huns, Avars, Bulgarians,
Magyars, Turks, Mongols, Tartars, etc., are found in subsequent
centuries repeating the same infliction, and establishing a dominion
both more durable, and not less destructive, than the transient
scourge of the Scythians during the reign of Kyaxarês.
After the expulsion of the Scythians from Asia, the full extent and
power of the Median empire was reëstablished; and Kyaxarês was
enabled again to besiege Nineveh. He took that great city, and
reduced under his dominion all the Assyrians except those who
formed the kingdom of Babylon. This conquest was achieved
towards the close of his reign, and he bequeathed the Median
empire, at the maximum of its grandeur, to his son Astyagês, in 595
B. C.[487]
As the dominion of the Scythians in Upper Asia lasted twenty
eight years before they were expelled by Kyaxarês, so also the
inroads of the Cimmerians through Asia Minor, which had begun
during the reign of the Lydian king Ardys, continued through the
twelve years of the reign of his son Sadyattês (629-617 B. C.), and
were finally terminated by Alyattês, son of the latter.[488]
Notwithstanding the Cimmerians, however, Sadyattês was in a
condition to prosecute a war against the Grecian city of Milêtus,
which continued during the last seven years of his reign, and which
he bequeathed to his son and successor. Alyattês continued the war
for five years longer. So feeble was the sentiment of union among
the various Grecian towns on the Asiatic coast, that none of them
would lend any aid to Milêtus except the Chians, who were under
special obligations to Milêtus for previous aid in a contest against
Erythræ: and the Milesians unassisted were no match for the Lydian
army in the field, though their great naval strength placed them out
of all danger of a blockade; and we must presume that the erection
of those mounds of earth against the walls, whereby the Persian
Harpagus vanquished the Ionian cities half a century afterwards,
was then unknown to the Lydians. For twelve successive years the
Milesian territory was annually overrun and ravaged, previous to the
gathering in of the crop. The inhabitants, after having been defeated
in two ruinous battles, gave up all hope of resisting the devastation,
so that the task of the invaders became easy, and the Lydian army
pursued their destructive march to the sound of flutes and harps.
They ruined the crops and the fruit-trees, but Alyattês would not
allow the farm-buildings or country-houses to be burnt, in order that
the means of production might still be preserved, to be again
destroyed during the following season. By such unremitting
devastation the Milesians were reduced to distress and famine, in
spite of their command of the sea; and the fate which afterwards
overtook them during the reign of Crœsus, of becoming tributary
subjects to the throne of Sardis, would have begun half a century
earlier, had not Alyattês unintentionally committed a profanation
against the goddess Athênê. Her temple at Assêssus accidentally
took fire, and was consumed, when his soldiers on a windy day were
burning the Milesian standing corn. Though no one took notice of
this incident at the time, yet Alyattês on his return to Sardis was
smitten with prolonged sickness. Unable to obtain relief, he
despatched envoys to seek humble advice from the god at Delphi;
but the Pythian priestess refused to furnish any healing suggestions
until he should have rebuilt the burnt temple of Athênê,—and
Periander, at that time despot of Corinth, having learned the tenor of
this reply, transmitted private information of it to Thrasybulus,
despot of Milêtus, with whom he was intimately allied. Presently
there arrived at Milêtus a herald on the part of Alyattês, proposing a
truce for the special purpose of enabling him to rebuild the
destroyed temple,—the Lydian monarch believing the Milesians to be
so poorly furnished with subsistence that they would gladly embrace
this temporary relief. But the herald on his arrival found abundance
of corn heaped up in the agora, and the citizens engaged in feasting
and enjoyment: for Thrasybulus had caused all the provision in the
town, both public and private, to be brought out, in order that the
herald might see the Milesians in a condition of apparent plenty, and
carry the news of it to his master. The stratagem succeeded.
Alyattês, under the persuasion that his repeated devastations
inflicted upon the Milesians no sensible privations, abandoned his
hostile designs, and concluded with them a treaty of amity and
alliance. It was his first proceeding to build two temples to Athênê,
in place of the one which had been destroyed, and he then,
forthwith, recovered from his protracted malady. His gratitude for
the cure was testified by the transmission of a large silver bowl, with
an iron footstand welded together by the Chian artist Glaukus,—the
inventor of the art of thus joining together pieces of iron.[489]
Alyattês is said to have carried on other operations against some
of the Ionic Greeks: he took Smyrna, but was defeated in an inroad
on the territory of Klazomenæ.[490] But on the whole, his long reign
of fifty-seven years was one of tranquillity to the Grecian cities on
the coast, though we hear of an expedition which he undertook
against Karia.[491] He is reported to have been during youth of
overweening insolence, but to have acquired afterwards a just and
improved character. By an Ionian wife he became father of Crœsus,
whom, even during his lifetime, he appointed satrap of the town of
Adramyttium, and the neighboring plain of Thêbê. But he had also
other wives and other sons, and one of the latter, Adramytus, is
reported as the founder of Adramyttium.[492] How far his dominion in
the interior of Asia Minor extended, we do not know, but very
probably his long and comparatively inactive reign may have favored
the accumulation of those treasures which afterwards rendered the
wealth of Crœsus so proverbial. His monument, an enormous
pyramidal mound upon a stone base, erected near Sardis, by the
joint efforts of the whole Sardian population, was the most
memorable curiosity in Lydia during the time of Herodotus; it was
inferior only to the gigantic edifices of Egypt and Babylon.[493]
Crœsus obtained the throne, at the death of his father, by
appointment from the latter. But there was a party among the
Lydians who had favored the pretensions of his brother Pantaleon;
one of the richest chiefs of which party was put to death afterwards
by the new king, under the cruel torture of a spiked carding-
machine,—his property confiscated.[494] The aggressive reign of
Crœsus, lasting fourteen years (559-545 B. C.), formed a marked
contrast to the long quiescence of his father during a reign of fifty-
seven years.
Pretences being easily found for war against the Asiatic Greeks,
Crœsus attacked them one after the other. Unfortunately, we know
neither the particulars of these successive aggressions, nor the
previous history of the Ionic cities, so as to be able to explain how it
was that the fifth of the Mermnad kings of Sardis met with such
unqualified success, in an enterprise which his predecessors had
attempted in vain. Milêtus alone, with the aid of Chios, had resisted
Alyattês and Sadyattês for eleven years,—and Crœsus possessed no
naval force, any more than his father and grandfather. But on this
occasion, not one of the towns can have displayed the like individual
energy. In regard to the Milesians, we may perhaps suspect that the
period now under consideration was comprised in that long duration
of intestine conflict which Herodotus represents (though without
defining exactly when) to have crippled the forces of the city for two
generations, and which was at length appeased by a memorable
decision of some arbitrators invited from Paros. These latter, called in
by mutual consent of the exhausted antagonist parties at Milêtus,
found both the city and her territory in a state of general neglect
and ruin. But on surveying the lands, they discovered some which
still appeared to be tilled with undiminished diligence and skill; to
the proprietors of these lands they consigned the government of the
town, in the belief that they would manage the public affairs with as
much success as their own.[495] Such a state of intestine weakness
would partly explain the easy subjugation of the Milesians by
Crœsus; while there was little in the habits of the Ionic cities to
present the chance of united efforts against a common enemy.
These cities, far from keeping up any effective political
confederation, were in a state of habitual jealousy of each other, and
not unfrequently in actual war.[496] The common religious festivals,—
the Deliac festival as well as the Pan-Ionia, and afterwards the
Ephesia in place of the Delia,—seem to have been regularly
frequented by all the cities throughout the worst of times. But these
assemblies had no direct political function, nor were they permitted
to control that sentiment of separate city-autonomy which was
paramount in the Greek mind,—though their influence was
extremely precious in calling forth social sympathies. Apart from the
periodical festival, meetings for special emergencies were held at the
Pan-Ionic temple; but from such meetings any city, not directly
implicated, kept aloof.[497] As in this case, so in others not less
critical throughout the historical period, the incapacity of large
political combination was the source of constant danger, and
ultimately proved the cause of ruin, to the independence of all the
Grecian states. Herodotus warmly commends the advice given by
Thalês to his Ionic countrymen,—and given, to use his remarkable
expression, “before the ruin of Ionia,”[498]—that a common senate,
invested with authority over all the twelve cities, should be formed
within the walls of Teôs, as the most central in position; and that all
the other cities should account themselves mere demes of this
aggregate commonwealth, or polis. Nor can we doubt that such was
the unavailing aspiration of many a patriot of Milêtus or Ephesus,
even before the final operations of Crœsus were opened against
them.
That prince attacked the Greek cities successively, finding or
making different pretences for hostility against each. He began with
Ephesus, which is said to have been then governed by a despot of
harsh and oppressive character, named Pindarus, whose father Melas
had married a daughter of Alyattês, and who was, therefore, himself
nephew of Crœsus.[499] The latter, having in vain invited Pindarus
and the Ephesians to surrender the town, brought up his forces and
attacked the walls: one of the towers being overthrown, the
Ephesians abandoned all hope of defending their town, and sought
safety by placing it under the guardianship of Artemis, to whose
temple they carried a rope from the walls,—a distance not less than
seven furlongs. They at the same time sent a message of
supplication to Crœsus, who is said to have granted them the
preservation of their liberties, out of reverence to the protection of
Artemis; exacting at the same time that Pindarus should quit the
place. Such is the tale of which we find a confused mention in Ælian
and Polyænus; but Herodotus, while he notices the fact of the long
rope whereby the Ephesians sought to place themselves in contact
with their divine protectress, does not indicate that Crœsus was
induced to treat them more favorably. Ephesus, like all the other
Grecian towns on the coast, was brought under subjection and
tribute to him.[500] How he dealt with them, and what degree of
coercive precaution he employed either to insure subjection or
collect tribute, the brevity of the historian does not acquaint us. But
they were required partially at least, if not entirely, to raze their
fortifications; for on occasion of the danger which supervened a few
years afterwards from Cyrus, they are found practically unfortified.
[501]
Thus completely successful in his aggressions on the continental
Asiatic Greeks, Crœsus conceived the idea of assembling a fleet, for
the purpose of attacking the islanders of Chios and Samos, but was
convinced,—as some said, by the sarcastic remark of one of the
seven Greek sages, Bias or Pittakus—of the impracticability of the
project. He carried his arms, however, with full success, over other
parts of the continent of Asia Minor, until he had subdued the whole
territory within the river Halys, excepting only the Kilikians and the
Lykians. The Lydian empire thus reached the maximum of its power,
comprehending, besides the Æolic, Ionic, and Doric Greeks on the
coast of Asia Minor, the Phrygians, Mysians, Mariandynians,
Chalybes, Paphlagonians, Thynian and Bithynian Thracians, Karians,
and Pamphylians. And the treasures amassed by Crœsus at Sardis,
derived partly from this great number of tributaries, partly from
mines in various places as well as the auriferous sands of the
Paktôlus, exceeded anything which the Greeks had ever before
known.
We learn, from the brief but valuable observations of Herodotus,
to appreciate the great importance of these conquests of Crœsus,
with reference not merely to the Grecian cities actually subjected,
but also indirectly to the whole Grecian world.
“Before the reign of Crœsus, observes the historian, all the
Greeks were free; it was by him first that Greeks were subdued into
tribute.” And he treats this event as the initial phenomenon of the
series, out of which grew the hostile relations between the Greeks
on one side, and Asia as represented by the Persians on the other,
which were uppermost in the minds of himself and his
contemporaries.
It was in the case of Crœsus that the Greeks were first called
upon to deal with a tolerably large barbaric aggregate under a
warlike and enterprising prince, and the result was such as to
manifest the inherent weakness of their political system, from its
incapacity of large combination. The separated autonomous cities
could only maintain their independence either through similar
disunion on the part of barbaric adversaries, or by superiority on
their own side of military organization as well as of geographical
position. The situation of Greece proper and of the islands was
favorable to the maintenance of such a system,—not so the shores
of Asia with a wide interior country behind. The Ionic Greeks were at
this time different from what they became during the ensuing
century, little inferior in energy to Athens or to the general body of
European Greeks, and could doubtless have maintained their
independence, had they cordially combined. But it will be seen
hereafter that the Greek colonies,—planted as isolated settlements,
and indisposed to political union, even when neighbors,—all of them
fell into dependence so soon as attack from the interior came to be
powerfully organized; especially if that organization was conducted
by leaders partially improved through contact with the Greeks
themselves. Small autonomous cities maintain themselves so long as
they have only enemies of the like strength to deal with: but to
resist larger aggregates requires such a concurrence of favorable
circumstances as can hardly remain long without interruption. And
the ultimate subjection of entire Greece, under the kings of
Macedon, was only an exemplification on the widest scale of this
same principle.
The Lydian monarchy under Crœsus, the largest with which the
Greeks had come into contact down to that moment, was very soon
absorbed into a still larger,—the Persian; of which the Ionic Greeks,
after unavailing resistance, became the subjects. The partial
sympathy and aid which they obtained from the independent or
European Greeks, their western neighbors, followed by the fruitless
attempt on the part of the Persian king to add these latter to his
empire, gave an entirely new turn to Grecian history and
proceedings. First, it necessitated a degree of central action against
the Persians which was foreign to Greek political instinct; next it
opened to the noblest and most enterprising section of the Hellenic
name,—the Athenians,—an opportunity of placing themselves at the
head of this centralizing tendency: while a concurrence of
circumstances, foreign and domestic, imparted to them at the same
time that extraordinary and many-sided impulse, combining action
with organization, which gave such brilliancy to the period of
Herodotus and Thucydidês. It is thus that most of the splendid
phenomena of Grecian history grew, directly or indirectly, out of the
reluctant dependence in which the Asiatic Greeks were held by the
inland barbaric powers, beginning with Crœsus.
These few observations will suffice to intimate that a new phase
of Grecian history is now on the point of opening. Down to the time
of Crœsus, almost everything which is done or suffered by the
Grecian cities bears only upon one or other of them separately: the
instinct of the Greeks repudiates even the modified forms of political
centralization, and there are no circumstances in operation to force it
upon them. Relation of power and subjection exist, between a
strong and a weak state, but no tendency to standing political
coördination. From this time forward, we shall see partial causes at
work, tending in this direction, and not without considerable
influence; though always at war with the indestructible instinct of
the nation, and frequently counteracted by selfishness and
misconduct on the part of the leading cities.
CHAPTER XVIII.
PHENICIANS.
Of the Phenicians, Assyrians, and Egyptians, it is necessary for
me to speak so far as they acted upon the condition, or occupied the
thoughts, of the early Greeks, without undertaking to investigate
thoroughly their previous history. Like the Lydians, all three became
absorbed into the vast mass of the Persian empire, retaining,
however, to a great degree, their social character and peculiarities
after having been robbed of their political independence.
The Persians and Medes,—portions of the Arian race, and
members of what has been classified, in respect of language, as the
great Indo-European family,—occupied a part of the vast space
comprehended between the Indus on the east, and the line of Mount
Zagros (running eastward of the Tigris and nearly parallel with that
river) on the west. The Phenicians as well as the Assyrians belonged
to the Semitic, Aramæan, or Syro-Arabian family; comprising,
besides, the Syrians, Jews, Arabians, and in part the Abyssinians. To
what established family of the human race the swarthy and curly-
haired Egyptians are to be assigned, has been much disputed; we
cannot reckon them as members of either of the two preceding, and
the most careful inquiries render it probable that their physical type
was something purely African, approximating in many points to that
of the negro.[502]
It has already been remarked that the Phenician merchant and
trading vessel figures in the Homeric poems as a well-known visitor,
and that the variegated robes and golden ornaments fabricated at
Sidon are prized among the valuable ornaments belonging to the
chiefs.[503] We have reason to conclude generally, that in these early
times, the Phenicians traversed the Ægean sea habitually, and even
formed settlements for trading and mining purposes upon some of
its islands: on Thasos, especially, near the coast of Thrace, traces of
their abandoned gold-mines were visible even in the days of
Herodotus, indicating both persevering labor and considerable length
of occupation. But at the time when the historical era opens, they
seem to have been in course of gradual retirement from these
regions,[504] and their commerce had taken a different direction. Of
this change we can furnish no particulars; but we may easily
understand that the increase of the Grecian marine, both warlike
and commercial, would render it inconvenient for the Phenicians to
encounter such enterprising rivals,—piracy (or private war at sea)
being then an habitual proceeding, especially with regard to
foreigners.
The Phenician towns occupied a narrow strip of the coast of Syria
and Palestine, about one hundred and twenty miles in length, never
more, and generally much less, than twenty miles in breadth,—
between Mount Libanus and the sea. Aradus—on an islet, with
Antaradus and Marathus over against it on the main land—was the
northernmost, and Tyre the southernmost (also upon a little island,
with Palæ-Tyrus and a fertile adjacent plain over against it). Between
the two were situated Sidon, Berytus, Tripolis, and Byblus, besides
some smaller towns[505] attached to one or other of these last
mentioned, and several islands close to the coast occupied in like
manner; while the colony of Myriandrus lay farther north, near the
borders of Kilikia. Whether Sidon or Tyre was the most ancient,
seems not determinable: if it be true as some authorities affirmed,
that Tyre was originally planted from Sidon, the colony must have
grown so rapidly as to surpass its metropolis in power and
consideration, for it became the chief of all the Phenician towns.[506]
Aradus, the next in importance after these two, was founded by
exiles from Sidon, and all the rest either by Tyrian or Sidonian
settlers. Within this confined territory was concentrated a greater
degree of commercial wealth and enterprise, and manufacturing
ingenuity, than could be found in any other portion of the
contemporary world. Each town was an independent community,
having its own surrounding territory and political constitution and its
own hereditary prince,[507] though the annals of Tyre display many
instances of princes assassinated by men who succeeded them on
the throne. Tyre appears to have enjoyed a certain presiding,
perhaps a controlling authority, over all of them, which was not
always willingly submitted to; and examples occur in which the
inferior towns, when Tyre was pressed by a foreign enemy,[508] took
the opportunity of revolting, or at least stood aloof. The same
difficulty of managing satisfactorily the relations between a presiding
town and its confederates, which Grecian history manifests, is found
also to prevail in Phenicia, and will be hereafter remarked in regard
to Carthage; while the same effects are also perceived, of the
autonomous city polity, in keeping alive the individual energies and
regulated aspirations of the inhabitants. The predominant sentiment
of jealous town-isolation is forcibly illustrated by the circumstances
of Tripolis, established jointly by Tyre, Sidon, and Aradus. It
consisted of three distinct towns, each one furlong apart from the
other two, and each with its own separate walls; though probably
constituting to a certain extent one political community, and serving
as a place of common meeting and deliberation for the entire
Phenician name.[509] The outlying promontories of Libanus and Anti-
Libanus touched the sea along the Phenician coast, and those
mountainous ranges, while they rendered a large portion of the very
confined area unfit for cultivation of corn, furnished what was
perhaps yet more indispensable,—abundant supplies of timber for
ship-building: the entire want of all wood in Babylonia, except the
date-palm, restricted the Assyrians of that territory from maritime
traffic on the Persian gulf. It appears, however, that the mountains
of Lebanon also afforded shelter to tribes of predatory Arabs, who
continually infested both the Phenician territory and the rich
neighboring plain of Cœle-Syria.[510]
The splendid temple of that great Phenician god (Melkarth)
whom the Greeks called Hêraklês,[511] was situated in Tyre, and the
Tyrians affirmed that its establishment had been coeval with the first
foundation of the city, two thousand three hundred years before the
time of Herodotus. This god is the companion and protector of their
colonial settlements, and the ancestor of the Phœnico-Libyan kings:
we find him especially at Carthage, Gadês, and Thasos.[512] Some
supposed that they had migrated to their site on the Mediterranean
coast, from previous abodes near the mouth of the Euphrates,[513]
or on islands (named Tylus and Aradus) of the Persian gulf, while
others treated the Mediterranean Phenicians as original, and the
others as colonists. Whether such be the fact or not, history knows
them in no other portion of Asia earlier than in Phenicia proper.
Though the invincible industry and enterprise of the Phenicians
maintained them as a people of importance down to the period of
the Roman empire, yet the period of their widest range and greatest
efficiency is to be sought much earlier,—anterior to 700 B. C. In these
remote times they and their colonists were the exclusive navigators
of the Mediterranean: the rise of the Greek maritime settlements
banished their commerce to a great degree from the Ægean sea,
and embarrassed it even in the more westerly waters. Their colonial
establishments were formed in Africa, Sicily, Sardinia, the Balearic
Isles, and Spain: the greatness as well as the antiquity of Carthage,
Utica, and Gadês, attest the long-sighted plans of Phenician traders,
even in days anterior to the 1st Olympiad. We trace the wealth and
industry of Tyre, and the distant navigation of her vessels through
the Red sea and along the coast of Arabia, back to the days of David
and Solomon. And as neither Egyptians, Assyrians, Persians, nor
Indians, addressed themselves to a seafaring life, so it seems that
both the importation and the distribution of the products of India
and Arabia into Western Asia and Europe, was performed by the
Idumæan Arabs, between Petra and the Red sea,—by the Arabs of
Gerrha on the Persian gulf, joined as they were in later times by a
body of Chaldæan exiles from Babylonia,—and by the more
enterprising Phenicians of Tyre and Sidon in these two seas as well
as in the Mediterranean.[514]
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com

More Related Content

PDF
Rich client programming plugging into the NetBeans Platform 1. print Edition ...
PPT
Netbeans 110511004930-phpapp01
PDF
Beginning Java Me Platform 1st Edition Ray Rischpater
PDF
NetBeans IDE & Platform
PPTX
netbeansplatform overview
PDF
Getting Started with the NetBeans Platform
PDF
Building Soabased Composite Applications Using Netbeans Ide 6 Frank Jennings
PPTX
netbeansplatform overview
Rich client programming plugging into the NetBeans Platform 1. print Edition ...
Netbeans 110511004930-phpapp01
Beginning Java Me Platform 1st Edition Ray Rischpater
NetBeans IDE & Platform
netbeansplatform overview
Getting Started with the NetBeans Platform
Building Soabased Composite Applications Using Netbeans Ide 6 Frank Jennings
netbeansplatform overview

Similar to Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach (20)

PPTX
20120315 netbeansplatform overview
DOC
City search documentation
PDF
Introduction To NetBeans IDE
PPT
Netbeans IDE & Platform
PDF
Netbeans-platform ref_card
PDF
Netbeans-platform ref_card
PDF
JavaOne 2010 Keynote
PDF
blueMarine Sailing with NetBeans Platform
ODP
Netbeans65 Osum Slides
PPTX
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
PDF
City search documentation
PDF
J2ee Open Source Toolkit Building An Enterprise Platform With Open Source Too...
PDF
Java Complete Reference Fifth Edition
PDF
Tutorial for netbeans
ODP
NetBeans 6.5
PDF
Eclipse Rich Client Platform 2nd Edition Jeff Mcaffer
ODP
Net Beans
ODP
Net Beans
PDF
blueMarine photographic workflow with Java
PDF
JavaFX Developing Rich Internet Applications 1st Edition Jim Clarke
20120315 netbeansplatform overview
City search documentation
Introduction To NetBeans IDE
Netbeans IDE & Platform
Netbeans-platform ref_card
Netbeans-platform ref_card
JavaOne 2010 Keynote
blueMarine Sailing with NetBeans Platform
Netbeans65 Osum Slides
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
City search documentation
J2ee Open Source Toolkit Building An Enterprise Platform With Open Source Too...
Java Complete Reference Fifth Edition
Tutorial for netbeans
NetBeans 6.5
Eclipse Rich Client Platform 2nd Edition Jeff Mcaffer
Net Beans
Net Beans
blueMarine photographic workflow with Java
JavaFX Developing Rich Internet Applications 1st Edition Jim Clarke
Ad

Recently uploaded (20)

PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Presentation on HIE in infants and its manifestations
PDF
Classroom Observation Tools for Teachers
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Presentation on HIE in infants and its manifestations
Classroom Observation Tools for Teachers
GDM (1) (1).pptx small presentation for students
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
O7-L3 Supply Chain Operations - ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Types and Its function , kingdom of life
A systematic review of self-coping strategies used by university students to ...
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
RMMM.pdf make it easy to upload and study
Chinmaya Tiranga quiz Grand Finale.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Supply Chain Operations Speaking Notes -ICLT Program
Ad

Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach

  • 1. Download the full version and explore a variety of ebooks or textbooks at https://ebookultra.com Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach _____ Tap the link below to start your download _____ https://ebookultra.com/download/rich-client-programming- plugging-into-the-netbeans-platform-1-print-edition-tulach/ Find ebooks or textbooks at ebookultra.com today!
  • 2. We believe these products will be a great fit for you. Click the link to download now, or visit ebookultra.com to discover even more! Pro Netbeans IDE 6 Rich Client Platform Edition Adam Myatt https://ebookultra.com/download/pro-netbeans-ide-6-rich-client- platform-edition-adam-myatt/ The Definitive Guide to NetBeans Platform 1st Edition Heiko Böck https://ebookultra.com/download/the-definitive-guide-to-netbeans- platform-1st-edition-heiko-bock/ The Definitive Guide to NetBeans Platform 1st Edition Heiko Böck (Auth.) https://ebookultra.com/download/the-definitive-guide-to-netbeans- platform-1st-edition-heiko-bock-auth/ Programming Wireless Devices with the Java 2 Platform 2nd Edition Roger Riggs https://ebookultra.com/download/programming-wireless-devices-with-the- java-2-platform-2nd-edition-roger-riggs/
  • 3. History in the Vernacular 1. paperback print. Edition Raziuddin Aquil https://ebookultra.com/download/history-in-the-vernacular-1-paperback- print-edition-raziuddin-aquil/ NetBeans The Definitive Guide 1st Edition Tim Boudreau https://ebookultra.com/download/netbeans-the-definitive-guide-1st- edition-tim-boudreau/ The Client First Edition John Grisham https://ebookultra.com/download/the-client-first-edition-john-grisham/ 20 Recipes for Programming PhoneGap Cross Platform Mobile Development for Android and iPhone 1st Edition Munro https://ebookultra.com/download/20-recipes-for-programming-phonegap- cross-platform-mobile-development-for-android-and-iphone-1st-edition- munro/ Philosophy and German literature 1700 1990 1. pbk. print Edition Saul https://ebookultra.com/download/philosophy-and-german- literature-1700-1990-1-pbk-print-edition-saul/
  • 5. Rich client programming plugging into the NetBeans Platform 1. print Edition Tulach Digital Instant Download Author(s): Tulach, Jaroslav; Boudreau, Tim; Wielenga, Geertjan ISBN(s): 9780132354806, 0132354802 Edition: 1. print File Details: PDF, 5.69 MB Year: 2007 Language: english
  • 8. This page intentionally left blank This page intentionally left blank
  • 9. Rich Client Programming Plugging into the NetBeansTM Platform Tim Boudreau Jaroslav Tulach Geertjan Wielenga Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City
  • 10. Copyright © 2007 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, California 95054 U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to implementations of the technology described in this publication. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents, foreign patents, or pending applications. Sun, Sun Microsystems, the Sun logo, NetBeans, J2EE, and all Sun and Java based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. This Book Is Safari Enabled The Safari Enabled icon on the cover of your favorite technology book means the book is available through Safari Bookshelf. When you buy this book, you get free access to the online edition for 45 days. Safari Bookshelf is an electronic reference library that lets you easily search thousands of technical books, find code samples, download chapters, and access technical information whenever and wherever you need it. To gain 45-day Safari Enabled access to this book: • Go to http://www.prenhallprofessional.com/safarienabled • Complete the brief registration form • Enter the coupon code 32IE-M6EH-YU9W-QRHE-V51D If you have difficulty registering on Safari Bookshelf or accessing the online edition, please e-mail [email protected]. Visit us on the Web: www.prenhallprofessional.com Library of Congress Cataloging-in-Publication Data Boudreau, Tim. Rich client programming : plugging into the NetBeans platform / Tim Boudreau, Jaroslav Tulach, Geertjan Wielenga. p. cm. Includes bibliographical references and index. ISBN 0-13-235480-2 (pbk. : alk. paper) 1. Java (Computer program language) 2. Computer programming. I. Tulach, Jaroslav. II. Wielenga, Geertjan. III. Title. QA76.73.J38B672 2007 005.13'3--dc22___________________________________2007007068 All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to: Pearson Education, Inc. Rights and Contracts Department One Lake Street Upper Saddle River, NJ 07458 Fax: (201) 236-3290 ISBN 0-13-235480-2 Text printed in the United States on recycled paper at Courier in Stoughton, Massachusetts. First printing, April 2007
  • 11. Foreword by Jonathan Schwartz xv Foreword by Jan Chalupa xvii Preface xix About the Authors and Contributors xxvii Acknowledgments xxxi Chapter One Getting Started with the NetBeans Platform 1 Setting Up the IDE 1 1.1 NetBeans IDE Basics 3 1.2 Creating a Module 3 1.2.1 Creating an Application 4 1.2.2 Using File Templates 6 1.2.3 Declaring Dependencies 7 1.2.4 Running a Module 8 1.2.5 Branding an Application 8 1.2.6 Distributing an Application 9 1.2.7 Chapter Two The Benefits of Modular Programming 11 Distributed Development 11 2.1 Modular Applications 13 2.2 Contents v
  • 12. Versioning 13 2.2.1 Secondary Versioning Information 14 2.2.2 Dependency Management 15 2.2.3 A Modular Programming Manifesto 15 2.3 Using NetBeans to Do Modular Programming 19 2.4 Chapter Three Modular Architecture 23 Modules—The Assembly Units of a Modular Application 23 3.1 Types of Modules 24 3.2 End-User Interface Module 24 3.2.1 Simple Library 25 3.2.2 Multiple Vendor Support 26 3.2.3 Modular Library 27 3.2.4 Module Lifecycle 29 3.3 Groups of Modules 33 3.4 Chapter Four Loosely Coupled Communication 39 Registration and Discovery 39 4.1 MetaInf Services 41 4.2 The Global Lookup 43 4.3 Writing an Extension Point 46 4.4 Chapter Five Lookup 49 Objects That Own Lookups 53 5.1 Lookup as a Communication Mechanism 55 5.2 Lookups and Proxying 58 5.3 Lookup and Selection 62 5.4 Writing Lookup-Sensitive Actions 63 5.5 Tracking the Global Selection 64 5.6 Legacy Variants of the Lookup Pattern in NetBeans APIs 65 5.7 Common Lookup Patterns 66 5.8 Chapter Six Filesystems 69 FileSystems and FileObjects 70 6.1 What Kinds of FileSystems Will I Be Dealing With? 71 6.2 Layering 72 6.3 XML Filesystems 73 6.4 Contents vi
  • 13. Declarative Registration II: The System Filesystem 74 6.5 How the System Filesystem Works 75 6.5.1 The System Filesystem Is Read/Write 76 6.5.2 Using FileChangeEvents from the System Filesystem 77 6.5.3 Exploring the System Filesystem—Menus 78 6.5.4 Getting from FileObjects to Java Objects 88 6.6 Using Factory Methods to Create Objects from .instance Files 90 6.6.1 Programmatic Access to the System Filesystem 93 6.6.2 Using .settings Files 94 6.6.3 Browsing the System Filesystem 96 6.7 Conclusions 96 6.8 Commonly Used Folders in the System Filesystem 96 6.8.1 Chapter Seven Threading, Listener Patterns, and MIME Lookup 103 Creating the Modules and SPI 104 7.1 Implementing ListModelProvider 107 7.2 Setting Up Dependencies 107 7.2.1 Creating XmlListModelProvider 109 7.2.2 Registering XmlListModelProvider 123 7.2.3 Providing a UI Component 123 7.3 The MIME Lookup SPI and API 124 7.3.1 Providing a Window Component to Show List Models 125 7.3.2 Using the Pseudo Navigator 132 7.4 Conclusion: PseudoNavigator—What’s Wrong with This Picture? 132 7.5 Chapter Eight The Window System 135 What the Window System Does 137 8.1 Classes in the Window System API 139 8.2 Using TopComponent 141 8.3 Persisting State across Sessions 145 8.4 Window System Persistence Modes 147 8.4.1 Window System Persistence Data 147 8.5 Creating Editor-Style (Nondeclarative) TopComponents 152 8.6 Opening Your Component Somewhere Else 153 8.6.1 Advanced Window System Configuration: Defining Your Own Modes 153 8.7 Using TopComponent Groups 158 8.8 Opening a Component Group Programmatically 161 8.8.1 vii Contents
  • 14. Chapter Nine Nodes, Explorer Views, Actions, and Presenters 163 The Nodes API 164 9.1 Using the Nodes API 167 9.1.1 The Explorer API 177 9.2 Types of Explorer View Components 177 9.2.1 Creating a TopComponent to Display Nodes 179 9.2.2 Adding a Detail View 182 9.2.3 Adding Another Detail View Using the Explorer API 184 9.2.4 Actions 190 9.3 Presenters 192 9.3.1 The Actions API and Standard NetBeans Actions 195 9.3.2 Installing Global Actions in Menus, Toolbars, and Keyboard Shortcuts 196 9.3.3 Context-Aware Actions 197 9.3.4 Node Properties 199 9.4 Nodes and DataObjects: Creating a System Filesystem Browser 203 9.5 Epilogue: Of Nodes, Property Sheets, and User Interface Design 205 9.6 Chapter Ten DataObjects and DataLoaders 207 DataObjects: Where Do They Come From? 210 10.1 Adding Support for a New File Type 212 10.2 Adding Support for Manifest Files to NetBeans 212 10.2.1 Providing a Manifest Object from Manifest Files 218 10.2.2 Providing ManifestProvider from ManifestDataObject and ManifestDataNode 219 10.2.3 Icon Badging 223 10.2.4 Testing ManifestDataObject with JUnit 228 10.2.5 Using Custom File Types Internally 234 10.3 Serialized Objects and the System Filesystem 235 10.4 Chapter Eleven Graphical User Interfaces 237 Introduction 237 11.1 Creating a New GUI Form 240 11.2 Placing and Aligning a Component in a Form 240 11.3 Setting Component Size and Resizability 242 11.4 Specifying Component Behavior and Appearance 244 11.5 Generating Event Listening and Handling Methods 244 11.6 Contents viii
  • 15. Customizing Generated Code 247 11.7 Building an Explorer View Visually 249 11.8 Previewing a Form 250 11.9 Using Custom Beans in the Form Editor 250 11.10 Using Different Layout Managers 251 11.11 Chapter Twelve Multiview Editors 253 Introduction 253 12.1 Getting Started 255 12.2 Understanding Multiview Editors 256 12.3 Creating the Editor’s Infrastructure 257 12.4 Creating the Source View 261 12.5 Describing a Source MultiViewElement 261 12.5.1 Creating a Source Editor 263 12.5.2 Adding the Source View to the Multiview Editor 267 12.5.3 Creating the Visual View 269 12.6 Adding a Visual View to the Multiview Editor 269 12.6.1 Finishing the Sample 271 12.7 Chapter Thirteen Syntax Highlighting 273 Introduction 273 13.1 Preparing to Create Syntax Highlighting 274 13.2 Creating Token IDs 275 13.3 Creating a Lexical Analyzer 277 13.4 Extending the Options Window 281 13.5 Registering the Syntax Highlighting in the Layer File 284 13.6 Finishing Up 286 13.7 Chapter Fourteen Code Completion 287 Introduction 287 14.1 Understanding Code Completion 289 14.2 Code Completion Query Types 291 14.3 Preparing to Work with the CompletionProvider Interface 291 14.4 Implementing a CompletionProvider 293 14.5 Implementing a CompletionItem 296 14.6 Adding a Filter to the CompletionProvider 300 14.7 ix Contents
  • 16. Adding Documentation to the Code Completion Box 304 14.8 Adding a Tooltip to the Code Completion Box 305 14.9 Chapter Fifteen Component Palettes 307 Introduction 307 15.1 Understanding the Component Palette 308 15.1.1 Creating Your First Palette 311 15.1.2 Adding Items to a Palette 313 15.2 Adding Items to Your First Palette 314 15.2.1 Letting the User Add Items to the Palette 321 15.2.2 Dragging and Dropping Palette Items 323 15.3 Defining a Drop Target 325 15.3.1 Defining a Drag Image 326 15.3.2 Defining a Drop Event 328 15.3.3 Defining a Drag Gesture 330 15.3.4 Adding Supporting Features to a Palette 331 15.4 Adding Actions to the Palette 332 15.4.1 Adding a Filter and Refreshing the Palette 335 15.4.2 Adding a Property Change Listener 338 15.4.3 Setting Palette Attributes 339 15.4.4 Providing a Palette Manager 341 15.4.5 Creating a Palette for a Text-Based Editor 344 15.5 Associating a Palette with a Text-Based Editor 344 15.5.1 Adding Items to a Text-Based Editor’s Palette 347 15.5.2 Formatting Dropped Items in a Text-Based Editor 350 15.5.3 Letting the User Add Items to a Text-Based Editor’s Palette 351 15.5.4 Chapter Sixteen Hyperlinks 355 Introduction 355 16.1 Preparing to Provide Hyperlinks 356 16.1.1 The HyperlinkProvider Class 356 16.1.2 Getting Started Really Quickly 356 16.1.3 Preparing to Work with the HyperlinkProvider Class 357 16.2 Hyperlinks in Manifest Files 359 16.3 Identifying Hyperlinks 360 16.3.1 Setting the Length of a Hyperlink 361 16.3.2 Opening the Referenced Document 362 16.3.3 Finishing Up 364 16.3.4 Contents x
  • 17. Chapter Seventeen Annotations 367 Introduction 367 17.1 Preparing to Create an Error Annotation 368 17.2 Creating an Error Annotation 368 17.3 Understanding the Error Annotation DTD 370 17.3.1 Registering an Error Annotation 375 17.3.2 Installing an Error Annotation 376 17.3.3 Preparing to Use an Error Annotation 376 17.4 Using an Error Annotation 377 17.5 Describing an Annotation 378 17.5.1 Attaching and Detaching Annotations 379 17.5.2 Defining a Request Processor Task 381 17.5.3 Annotating Part of a Line 382 17.5.4 Finishing Up 383 17.6 Chapter Eighteen Options Windows 385 Introduction 385 18.1 Your First Options Window Extension 385 18.1.1 Looking at the Options Window Extension Files 389 18.2 The AdvancedOption Class 389 18.2.1 The OptionsPanelController Class 390 18.2.2 The Visual Options Panels 392 18.2.3 Creating a Primary Panel 393 18.3 Your First Primary Panel 393 18.3.1 Reordering Options Panels 395 18.3.2 Adding Settings to the Options Window 396 18.4 Example: Using the Preferences API 396 18.4.1 Chapter Nineteen Web Frameworks 399 Introduction 399 19.1 Preparing to Provide Support for a Web Framework 400 19.1.1 The WebFrameworkProvider Class 401 19.1.2 Getting Started Really Quickly 402 19.1.3 Example: Basic Registration 402 19.1.4 Preparing to Work with the WebFrameworkProvider Class 404 19.2 Providing a Framework Configuration Panel 406 19.3 Creating the Configuration Panel 407 19.3.1 xi Contents
  • 18. Example: Adding a Configuration Panel to the WebFrameworkProvider 410 19.3.2 Coding the Configuration Panel 411 19.3.3 Creating a Source Structure 413 19.4 Preparing to Use the extend() Method 414 19.4.1 Example: Defining the extend() Method 414 19.4.2 Creating Templates 416 19.4.3 A Template for Creating a Java File 416 19.4.4 Preparing to Use a Template to Programmatically Create a Java File 417 19.4.5 Using a Template to Programmatically Create a Java File 419 19.4.6 Trying Out the Framework Support Module 422 19.4.7 Letting the User Select a Library in the Frameworks Panel 423 19.5 Project Properties Dialog Box and Web Frameworks 424 19.6 Example: isInWebModule() Method 426 19.6.1 Finishing Up 427 19.7 Chapter Twenty Web Services 429 Introduction 429 20.1 Creating and Testing a Web Service Client 430 20.2 Integrating the Web Service Client 435 20.3 Chapter Twenty-One JavaHelp Documentation 441 Creating a Help Set 442 21.1 Adding New Help Topics 445 21.1.1 Removing the IDE’s Help Sets 446 21.2 Branding the Help Set’s Default Texts 449 21.3 Chapter Twenty-Two Update Centers 453 Introduction 453 22.1 Adding the IDE’s Update Center Functionality 454 22.2 Creating and Distributing an Autoupdate Descriptor 456 22.3 Using the IDE to Create an Autoupdate Descriptor 456 22.3.1 Uploading the Autoupdate Descriptor and NBM Files 457 22.3.2 Distributing the URL to the Autoupdate Descriptor 458 22.4 Generating a Module for Registering an Autoupdate Descriptor 459 22.4.1 Making the User Manually Register an Autoupdate Descriptor 460 22.4.2 Contents xii
  • 19. Downloading NBM Files from an Update Center 461 22.5 Publishing Updates to Existing Modules 462 22.6 Chapter Twenty-Three Use Case 1: Jens Trapp on NetBeans Module Development 463 Introduction 463 23.1 Calling the External Tool 465 23.2 Creating the Tidy Error Check Action 465 23.2.1 Retrieving the Filename 468 23.2.2 Running HTML Tidy 469 23.2.3 Resolving Dependencies 473 23.2.4 Running the Example 473 23.2.5 Handling the Output 476 23.3 Printing the Output 476 23.3.1 Listening to the Output 479 23.3.2 Parsing the Output 481 23.3.3 Annotating Errors in the Source Editor 484 23.3.4 Configuring the Tool 491 23.4 Extending the Options Window 491 23.4.1 Persisting the Options 494 23.4.2 Formatting and Converting Files 496 23.5 Manipulating Files 497 23.5.1 Seeing the Difference 504 23.5.2 Controlling the Conversion 505 23.6 Creating the Wizard 505 23.6.1 Connecting the Wizard 517 23.6.2 Chapter Twenty-Four Use Case 2: Rich Unger on Application Development 521 Introduction 521 24.1 Getting Started 522 24.2 Creating Support for the audio/wav MIME Type 526 24.3 Encapsulating Audio Data in the WavDataObject 530 24.4 Creating a Component for Viewing WAV Files 533 24.5 Converting WAV Editor to Multiview 535 24.6 Creating an API for Plugging in Additional Views 542 24.7 Implementing Your Own API to Provide a New View 544 24.8 xiii Contents
  • 20. Appendix A Advanced Module System Techniques 551 Hiding Implementation Details 551 A.1 Design for Extensibility 553 A.2 Splitting API and Implementation 555 A.3 Do I Really Need Cyclic Dependency? 559 A.4 Crossing the Informational Divide 563 A.5 Restricting Access to Friends 565 A.6 Having Public as Well as Friend API 566 A.7 A Final Word on Modularity 568 A.8 Appendix B Common Idioms and Code Patterns in NetBeans 569 Things You Do Differently in NetBeans Than in Plain Swing Code 569 B.1 Things That Represent Files 571 B.2 Working with Lookup 573 B.3 Projects 573 B.4 Appendix C Performance 575 Responsiveness versus Performance 577 C.1 Performance Tips for Module Authors 578 C.2 Writing Modules That Are Good Citizens 579 C.3 Index 583 Contents xiv
  • 21. Exploring the Variety of Random Documents with Different Content
  • 22. CHAPTER XVII. LYDIANS. — MEDES. — CIMMERIANS. — SCYTHIANS. The early relations between the Lydians and the Asiatic Greeks, anterior to the reign of Gygês, are not better known to us than those of the Phrygians. Their native music became partly incorporated with the Greek, as the Phrygian music was; to which it was very analogous, both in instruments and in character, though the Lydian mode was considered by the ancients as more effeminate and enervating. The flute was used alike by Phrygians and Lydians, passing from both of them to the Greeks; but the magadis or pectis (a harp with sometimes as many as twenty strings, sounded two together in octave) is said to have been borrowed by the Lesbian Terpander from the Lydian banquets.[416] The flute-players who acquired esteem among the early Asiatic Greeks were often Phrygian or Lydian slaves; and even the poet Alkman, who gained for himself permanent renown among the Greek lyric poets, though not a slave born at Sardis, as is sometimes said, was probably of Lydian extraction. It has been already mentioned that Homer knows nothing of Lydia or Lydians. He names Mæonians in juxtaposition with Karians, and we are told by Herodotus that the people once called Mæonian received the new appellation of Lydian from Lydus son of Atys. Sardis, whose almost inexpugnable citadel was situated on a precipitous rock on the northern side of the ridge of Tmôlus, overhanging the plain of the river Hermus, was the capital of the Lydian kings: it is not named by Homer, though he mentions both Tmôlus and the neighboring Gygæan lake: the fortification of it was
  • 23. ascribed to an old Lydian king named Mêlês, and strange legends were told concerning it.[417] Its possessors were enriched by the neighborhood of the river Paktôlus, which flowed down from Mount Tmôlus towards the Hermus, and brought with it considerable quantities of gold in its sands. To this cause historians often ascribe the abundant treasure belonging to Crœsus and his predecessors; but Crœsus possessed, besides, other mines near Pergamus;[418] and another cause of wealth is also to be found in the general industry of the Lydian people, which the circumstances mentioned respecting them seem to attest. They were the first people, according to Herodotus, who ever carried on retail trade; and the first to coin money of gold and silver.[419] The archæologists of Sardis in the time of Herodotus, a century after the Persian conquest, carried very far back the antiquity of the Lydian monarchy, by means of a series of names which are in great part, if not altogether, divine and heroic. Herodotus gives us first, Manês, Atys, and Lydus,—next, a line of kings beginning with Hêraklês, twenty-two in number, succeeding each other from father to son and lasting for 505 years. The first of this line of Herakleid kings was Agrôn, descended from Hêraklês in the fourth generation, —Hêraklês, Alkæus, Ninus, Bêlus, and Agrôn. The twenty-second prince of this Herakleid family, after an uninterrupted succession of father and son during 505 years, was Kandaulês, called by the Greeks Myrsilus the son of Myrsus: with him the dynasty ended, and ended by one of those curious incidents which Herodotus has narrated with his usual dramatic, yet unaffected, emphasis. It was the divine will that Kandaulês should be destroyed, and he lost his rational judgment: having a wife the most beautiful woman in Lydia, his vanity could not be satisfied without exhibiting her naked person to Gygês son of Daskylus, his principal confidant and the commander of his guards. In spite of the vehement repugnance of Gygês, this resolution was executed; but the wife became aware of the inexpiable affront, and took her measures to avenge it. Surrounded by her most faithful domestics, she sent for Gygês, and addressed him: “Two ways are now open to thee, Gygês: take which
  • 24. thou wilt. Either kill Kandaulês, wed me, and acquire the kingdom of Lydia,—or else thou must at once perish. For thou hast seen forbidden things, and either thou, or the man who contrived it for thee must die.” Gygês in vain entreated to be spared so terrible an alternative: he was driven to the option, and he chose that which promised safety to himself.[420] The queen planted him in ambush behind the bed-chamber door, in the very spot where Kandaulês had placed him as a spectator, and armed him with a dagger, which he plunged into the heart of the sleeping king. Thus ended the dynasty of the Herakleids; but there was a large party in Lydia who indignantly resented the death of Kandaulês, and took arms against Gygês. A civil war ensued, which both parties at length consented to terminate by reference to the Delphian oracle. The decision of that holy referee was given in favor of Gygês, and the kingdom of Lydia thus passed to his dynasty, called the Mermnadæ. But the oracle accompanied its verdict with an intimation, that in the person of the fifth descendant of Gygês, the murder of Kandaulês would be avenged,—a warning of which, Herodotus innocently remarks, no one took any notice, until it was actually fulfilled in the person of Crœsus.[421] In this curious legend, which marks the commencement of the dynasty called Mermnadæ, the historical kings of Lydia,—we cannot determine how much, or whether any part, is historical. Gygês was probably a real man, contemporary with the youth of the poet Archilochus; but the name Gygês is also an heroic name in Lydian archæology. He is the eponymus of the Gygæan lake near Sardis; and of the many legends told respecting him, Plato has preserved one, according to which Gygês is a mere herdsman of the king of Lydia: after a terrible storm and earthquake, he sees near him a chasm in the earth, into which he descends and finds a vast horse of brass, hollow and partly open, wherein there lies a gigantic corpse with a golden ring. This ring he carries away, and discovers unexpectedly that it possesses the miraculous property of rendering him invisible at pleasure. Being sent on a message to the king, he
  • 25. makes the magic ring available to his ambition: he first possesses himself of the person of the queen, then with her aid assassinates the king, and finally seizes the sceptre.[422] The legend thus recounted by Plato, different in almost all points from the Herodotean, has this one circumstance in common, that the adventurer Gygês, through the favor and help of the queen, destroys the king and becomes his successor. Feminine preference and patronage is the cause of his prosperity. Klausen has shown[423] that this “aphrodisiac influence” runs in a peculiar manner through many of the Asiatic legends, both divine and heroic. The Phrygian Midas, or Gordius, as before recounted, acquires the throne by marriage with a divinely privileged maiden: the favor shown by Aphroditê to Anchisês, confers upon the Æneadæ sovereignty in the Troad: moreover, the great Phrygian and Lydian goddess Rhea or Cybelê has always her favored and self-devoting youth Atys, who is worshipped along with her, and who serves as a sort of mediator between her and mankind. The feminine element appears predominant in Asiatic mythes: Midas, Sardanapalus, Sandôn, and even Hêraklês,[424] are described as clothed in women’s attire and working at the loom; while on the other hand the Amazons and Semiramis achieve great conquests. Admitting therefore the historical character of the Lydian kings called Mermnadæ, beginning with Gygês about 715-690 B. C., and ending with Crœsus, we find nothing but legend to explain to us the circumstances which led to their accession. Still less can we make out anything respecting the preceding kings, or determine whether Lydia was ever in former times connected with or dependent upon the kingdom of Assyria, as Ktêsias affirmed.[425] Nor can we certify the reality or dates of the old Lydian kings named by the native historian Xanthus,—Alkimus, Kamblês, Adramytês.[426] One piece of valuable information, however, we acquire from Xanthus,—the distribution of Lydia into two parts, Lydia proper and Torrhêbia, which he traces to the two sons of Atys,—Lydus and Torrhêbus; he states that the dialect of the Lydians and Torrhebians differed much
  • 26. in the same degree as that of Doric and Ionic Greeks.[427] Torrhêbia appears to have included the valley of the Kaïster, south of Tmôlus, and near to the frontiers of Karia. With Gygês, the Mermnad king, commences the series of aggressions from Sardis upon the Asiatic Greeks, which ultimately ended in their subjection. Gygês invaded the territories of Milêtus and Smyrna, and even took the city, probably not the citadel, of Kolophôn. Though he thus, however, made war upon the Asiatic Greeks, he was munificent in his donations to the Grecian god of Delphi, and his numerous as well as costly offerings were seen in the temple by Herodotus. Elegiac compositions of the poet Mimnermus celebrated the valor of the Smyrnæans in their battle with Gygês. [428] We hear also, in a story which bears the impress of Lydian more than of Grecian fancy, of a beautiful youth of Smyrna named Magnês, to whom Gygês was attached, and who incurred the displeasure of his countrymen for having composed verses in celebration of the victories of the Lydians over the Amazons. To avenge the ill-treatment received by this youth, Gygês attacked the territory of Magnêsia (probably Magnêsia on Sipylus) and after a considerable struggle took the city.[429] How far the Lydian kingdom of Sardis extended during the reign of Gygês, we have no means of ascertaining. Strabo alleges that the whole Troad[430] belonged to him, and that the Greek settlement of Abydus on the Hellespont was established by the Milesians only under his auspices. On what authority this statement is made, we are not told, and it appears doubtful, especially as so many legendary anecdotes are connected with the name of Gygês. This prince reigned (according to Herodotus) thirty-eight years, and was succeeded by his son Ardys, who reigned forty-nine years (about B. C. 678-629). We learn that he attacked the Milesians, and took the Ionic city of Priênê, but this possession cannot have been maintained, for the city appears afterwards as autonomous.[431] His long reign, however, was signalized by two events, both of considerable moment to the Asiatic Greeks; the invasion of the
  • 27. Cimmerians,—and the first approach to collision, at least the first of which we have any historical knowledge, between the inhabitants of Lydia and those of Upper Asia under the Median kings. It is affirmed by all authors that the Medes were originally numbered among the subjects of the great Assyrian empire, of which Nineveh—or Ninos, as the Greeks call it—was the chief town, and Babylon one of the principal portions. That the population and power of these two great cities, as well as of several others which the Ten Thousand Greeks in their march found ruined and deserted in those same regions, is of high antiquity,[432] there is no room for doubting; but it is noway incumbent upon a historian of Greece to entangle himself in the mazes of Assyrian chronology, or to weigh the degree of credit to which the conflicting statements of Herodotus, Ktêsias, Berosus, Abydênus, etc. are entitled. With the Assyrian empire,[433]—which lasted, according to Herodotus, five hundred and twenty years, according to Ktêsias, thirteen hundred and sixty years,—the Greeks have no ascertainable connection: the city of Nineveh appears to have been taken by the Medes a little before the year 600 B. C. (in so far as the chronology can be made out), and exercised no influence upon Grecian affairs. Those inhabitants of Upper Asia, with whom the early Greeks had relation, were the Medes, and the Assyrians or Chaldæans of Babylon,—both originally subject to the Assyrians of Nineveh,—both afterwards acquiring independence,—and both ultimately embodied in the Persian empire. At what time either of them became first independent, we do not know:[434] the astronomical canon which gives a list of kings of Babylon, beginning with what is called the era of Nabonassar, or 747 B. C., does not prove at what epoch these Babylonian chiefs became independent of Nineveh: and the catalogue of Median kings, which Herodotus begins with Dêïokês, about 709-711 B. C., is commenced by Ktêsias more than a century earlier,—moreover, the names in the two lists are different almost from first to last.
  • 28. For the historian of Greece, the Medes first begin to acquire importance about 656 B. C., under a king whom Herodotus calls Phraortês, son of Dêïokês. Respecting Dêïokês himself, Herodotus recounts to us how he came to be first chosen king.[435] The seven tribes of Medes dwelt dispersed in separate villages, without any common authority, and the mischiefs of anarchy were painfully felt among them: Dêïokês having acquired great reputation in his own village as a just man, was invoked gradually by all the adjoining villages to settle their disputes. As soon as his efficiency in this vocation, and the improvement which he brought about, had become felt throughout all the tribes, he artfully threw up his post and retired again into privacy,—upon which the evils of anarchy revived in a manner more intolerable than before. The Medes had now no choice except to elect a king,—the friends of Dêïokês expatiated warmly upon his virtues, and he was the person chosen. [436] The first step of the new king was to exact from the people a body of guards selected by himself; next, he commanded them to build the city of Ekbatana, upon a hill surrounded with seven concentric circles of walls, his own palace being at the top and in the innermost. He farther organized the scheme of Median despotism; the king, though his person was constantly secluded in his fortified palace, inviting written communications from all aggrieved persons, and administering to each the decision or the redress which it required,—informing himself, moreover, of passing events by means of ubiquitous spies and officials, who seized all wrong-doers and brought them to the palace for condign punishment. Dêïokês farther constrained the Medes to abandon their separate abodes and concentrate themselves in Ekbatana, from whence all the powers of government branched out; and the seven distinct fortified circles in the town, coinciding as they do with the number of the Median tribes, were probably conceived by Herodotus as intended each for one distinct tribe,—the tribe of Dêïokês occupying the innermost along with himself.[437] Except the successive steps of this well-laid political plan, we hear of no other acts ascribed to Dêïokês: he is said to have held the
  • 29. government for fifty-three years, and then dying, was succeeded by his son Phraortês. Of the real history of Dêïokês, we cannot be said to know anything. For the interesting narrative of Herodotus, of which the above is an abridgment, presents to us in all its points Grecian society and ideas, not Oriental: it is like the discussion which the historian ascribes to the seven Persian conspirators, previous to the accession of Darius,—whether they shall adopt an oligarchical, a democratical, or a monarchical form of government;[438] or it may be compared, perhaps more aptly still, to the Cyropædia of Xenophon, who beautifully and elaborately works out an ideal which Herodotus exhibits in brief outline. The story of Dêïokês describes what may be called the despot’s progress, first as candidate, and afterwards as fully established. Amidst the active political discussion carried on by intelligent Greeks in the days of Herodotus, there were doubtless many stories of the successful arts of ambitious despots, and much remark as to the probable means conducive to their success, of a nature similar to those in the Politics of Aristotle: one of these tales Herodotus has employed to decorate the birth and infancy of the Median monarchy. His Dêïokês begins like a clever Greek among other Greeks, equal, free, and disorderly. He is athirst for despotism from the beginning, and is forward in manifesting his rectitude and justice, “as beseems a candidate for command;”[439] he passes into a despot by the public vote, and receives what to the Greeks was the great symbol and instrument of such transition, a personal body- guard; he ends by organizing both the machinery and the etiquette of a despotism in the Oriental fashion, like the Cyrus of Xenophon, [440] only that both these authors maintain the superiority of their Grecian ideal over Oriental reality by ascribing both to Dêïokês and Cyrus a just, systematic, and laborious administration, such as their own experience did not present to them in Asia. Probably Herodotus had visited Ekbatana (which he describes and measures like an eye- witness, comparing its circuit to that of Athens), and there heard that Dêïokês was the builder of the city, the earliest known Median king, and the first author of those public customs which struck him as peculiar, after the revolt from Assyria: the interval might then be easily filled up, between Median autonomy and Median despotism,
  • 30. by intermediate incidents, such as would have accompanied that transition in the longitude of Greece. The features of these inhabitants of Upper Asia, for a thousand years forward from the time at which we are now arrived,—under the descendants of Dêïokês, of Cyrus, of Arsakês, and of Ardshir,—are so unvarying,[441] that we are much assisted in detecting those occasions in which Herodotus or others infuse into their history indigenous Grecian ideas. Phraortês (658-636 B. C.), having extended the dominion of the Medes over a large portion of Upper Asia, and conquered both the Persians and several other nations, was ultimately defeated and slain in a war against the Assyrians of Nineveh: who, though deprived of their external dependencies, were yet brave and powerful by themselves. His son Kyaxarês (636-595 B. C.) followed up with still greater energy the same plans of conquest, and is said to have been the first who introduced any organization into the military force;— before his time, archers, spearmen, and cavalry had been confounded together indiscriminately, until this monarch established separate divisions for each. He extended the Median dominion to the eastern bank of the Halys, which river afterwards, by the conquests of the Lydian king Crœsus, became the boundary between the Lydian and Median empires; and he carried on war for six years with Alyattês king of Lydia, in consequence of the refusal of the latter to give up a band of Scythian nomads, who, having quitted the territory of Kyaxarês in order to escape severities with which they were menaced, had sought refuge as suppliants in Lydia.[442] The war, indecisive as respects success, was brought to its close by a remarkable incident: in the midst of a battle between the Median and Lydian armies, there happened a total eclipse of the sun, which occasioned equal alarm to both parties, and induced them immediately to cease hostilities.[443] The Kilikian prince Syennesis, and the Babylonian prince Labynêtus, interposed their mediation, and effected a reconciliation between Kyaxarês and Alyattês, one of the conditions of which was, that Alyattês gave his daughter Aryênis in marriage to Astyagês son of Kyaxarês. In this manner began the
  • 31. connection between the Lydian and Median kings which afterwards proved so ruinous to Crœsus. It is affirmed that the Greek philosopher Thalês foretold this eclipse; but we may reasonably consider the supposed prediction as not less apocryphal than some others ascribed to him, and doubt whether at that time any living Greek possessed either knowledge or scientific capacity sufficient for such a calculation.[444] The eclipse itself, and its terrific working upon the minds of the combatants, are facts not to be called in question; though the diversity of opinion among chronologists, respecting the date of it, is astonishing.[445] It was after this peace with Alyattês, as far as we can make out the series of events in Herodotus, that Kyaxarês collected all his forces and laid siege to Nineveh, but was obliged to desist by the unexpected inroad of the Scythians. Nearly at the same time that Upper Asia was desolated by these formidable nomads, Asia Minor too was overrun by other nomads,—the Cimmerians,—Ardys being then king of Lydia; and the two invasions, both spreading extreme disaster, are presented to us as indirectly connected together in the way of cause and effect. The name Cimmerians appears in the Odyssey,—the fable describes them as dwelling beyond the ocean-stream, immersed in darkness and unblessed by the rays of Helios. Of this people as existent we can render no account, for they had passed away, or lost their identity and become subject, previous to the commencement of trustworthy authorities: but they seem to have been the chief occupants of the Tauric Chersonesus (Crimea) and of the territory between that peninsula and the river Tyras (Dniester), at the time when the Greeks first commenced their permanent settlements on those coasts in the seventh century B. C. The numerous localities which bore their name, even in the time of Herodotus,[446] after they had ceased to exist as a nation,—as well as the tombs of the Cimmerian kings then shown near the Tyras,—sufficiently attest this fact; and there is reason to believe that they were—like their conquerors and successors the Scythians—a nomadic people, mare-
  • 32. milkers, moving about with their tents and herds, suitably to the nature of those unbroken steppes which their territory presented, and which offered little except herbage in profusion. Strabo tells us[447]—on what authority we do not know—that they, as well as the Trêres and other Thracians, had desolated Asia Minor more than once before the time of Ardys, and even earlier than Homer. The Cimmerians thus belong partly to legend partly to history; but the Scythians formed for several centuries an important section of the Grecian contemporary world. Their name, unnoticed by Homer, occurs for the first time in the Hesiodic poems. When the Homeric Zeus in the Iliad turns his eye away from Troy towards Thrace, he sees, besides the Thracians and Mysians, other tribes, whose names cannot be made out, but whom the poet knows as milk-eaters and mare-milkers;[448] and the same characteristic attributes, coupled with that of “having wagons for their dwelling- houses,” appear in Hesiod connected with the name of the Scythians.[449] The navigation of the Greeks into the Euxine, gradually became more and more frequent, and during the last half of the seventh century B. C. their first settlements on its coasts were established. The foundation of Byzantium, as well as of the Pontic Herakleia, at a short distance to the east of the Thracian Bosphorus, by the Megarians, is assigned to the 30th Olympiad, or 658 B. C.;[450] and the succession of colonies founded by the enterprise of Milesian citizens on the western coast of the Euxine, seem to fall not very long after this date,—at least within the following century. Istria, Tyras, and Olbia, or Borysthenes, were planted respectively near the mouths of the three great rivers Danube, Dniester, and Bog: Kruni, Odêssus, Tomi, Kallatis, and Apollonia, were also planted on the south-western or Thracian coast, northward of the dangerous land of Salmydessus, so frequent in wrecks, but south of the Danube.[451] According to the turn of Grecian religious faith, the colonists took out with them the worship of the hero Achilles (from whom, perhaps, the œkist and some of the expatriating chiefs professed to be descended), which they established with great solemnity both in the various towns and on the small adjoining islands: and the earliest
  • 33. proof which we find of Scythia, as a territory familiar to Grecian ideas and feeling, is found in a fragment of the poet Alkæus (about B. C. 600), wherein he addresses Achilles[452] as “sovereign of Scythia.” There were, besides, several other Milesian foundations on or near the Tauric Chersonese (Crimea) which brought the Greeks into conjunction with the Scythians,—Herakleia, Chersonêsus, and Theodosia, on the southern coast and south-western corner of the peninsula,—Pantikapæum and the Teian colony of Phanagoria (these two on the European and Asiatic sides of the Cimmerian Bosphorus respectively), and Kêpi, Hermônassa, etc. not far from Phanagoria, on the Asiatic coast of the Euxine: last of all, there was, even at the extremity of the Palus Mæotis (Sea of Azof), the Grecian settlement of Tanais.[453] All or most of these seem to have been founded during the course of the sixth century B. C., though the precise dates of most of them cannot be named; probably several of them anterior to the time of the mystic poet Aristeas of Prokonnêsus, about 540 B. C. His long voyage from the Palus Mæotis (Sea of Azof) into the interior of Asia as far as the country of the Issêdones (described in a poem, now lost, called the Arimaspian verses), implies an habitual intercourse between Scythians and Greeks which could not well have existed without Grecian establishments on the Cimmerian Bosphorus. Hekatæus of Milêtus,[454] appears to have given much geographical information respecting the Scythian tribes; but Herodotus, who personally visited the town of Olbia, together with the inland regions adjoining to it, and probably other Grecian settlements in the Euxine (at a time which we may presume to have been about 450-440 B. C.),—and who conversed with both Scythians and Greeks competent to give him information,—has left us far more valuable statements respecting the Scythian people, dominion, and manners, as they stood in his day. His conception of the Scythians, as well as that of Hippokratês, is precise and well-defined,—very different from that of the later authors, who use the word almost indiscriminately to denote all barbarous nomads. His territory, called Scythia, is a square area, twenty days’ journey or four thousand
  • 34. stadia (somewhat less than five hundred English miles) in each direction,—bounded by the Danube (the course of which river he conceives in a direction from N. W. to S. E.), the Euxine, and the Palus Mæotis with the river Tanais, on three sides respectively,—and on the fourth or north side by the nations called Agathyrsi, Neuri, Androphagi, and Melanchlæni.[455] However imperfect his idea of the figure of this territory may be found, if we compare it with a good modern map, the limits which he gives us are beyond dispute: from the lower Danube and the mountains eastward of Transylvania to the lower Tanais, the whole area was either occupied by or subject to the Scythians. And this name comprised tribes differing materially in habits and civilization. The great mass of the people who bore it, strictly nomadic in their habits,—neither sowing nor planting, but living only on food derived from animals, especially mare’s milk and cheese,—moved from place to place, carrying their families in wagons covered with wicker and leather, themselves always on horseback with their flocks and herds, between the Borysthenês and the Palus Mæotis; they hardly even reached so far westward as the Borysthenês, since a river (not easily identified) which Herodotus calls Pantikapês, flowing into the Borysthenês from the eastward, formed their boundary. These nomads were the genuine Scythians, possessing the marked attributes of the race, and including among their number the regal Scythians,[456]—hordes so much more populous and more effective in war than the rest, as to maintain undisputed ascendency, and to account all other Scythians no better than their slaves. It was to these that the Scythian kings belonged, by whom the religious and political unity of the name was maintained,—each horde having its separate chief, and to a certain extent separate worship and customs. But besides these nomads, there were also agricultural Scythians, with fixed abodes, living more or less upon bread, and raising corn for exportation, along the banks of the Borysthenês and the Hypanis.[457] And such had been the influence of the Grecian settlement of Olbia at the mouth of the latter river in creating new tastes and habits, that two tribes on its western banks, the Kallippidæ and the Alazônes, had become completely accustomed both to tillage and to vegetable food, and
  • 35. had in other respects so much departed from their Scythian rudeness as to be called Hellenic-Scythians, many Greeks being seemingly domiciled among them. Northward of the Alazônes, lay those called the agricultural Scythians, who sowed corn, not for food but for sale.[458] Such stationary cultivators were doubtless regarded by the predominant mass of the Scythians as degenerate brethren; and some historians maintain that they belonged to a foreign race, standing to the Scythians merely in the relation of subjects,[459]—an hypothesis contradicted implicitly, if not directly, by the words of Herodotus, and no way necessary in the present case. It is not from them, however, that Herodotus draws his vivid picture of the people, with their inhuman rites and repulsive personal features. It is the purely nomadic Scythians whom he depicts, the earliest specimens of the Mongolian race (so it seems probable)[460] known to history, and prototypes of the Huns and Bulgarians of later centuries. The sword, in the literal sense of the word, was their chief god,[461]—an iron scymetar solemnly elevated upon a wide and lofty platform, which was supported on masses of fagots piled underneath,—to whom sheep, horses, and a portion of their prisoners taken in war, were offered up in sacrifice: Herodotus treats this sword as the image of the god Arês, thus putting an Hellenic interpretation upon that which he describes literally as a barbaric rite. The scalps and the skins of slain enemies, and sometimes the skull formed into a drinking-cup, constituted the decoration of a Scythian warrior: whoever had not slain an enemy, was excluded from participation in the annual festival and bowl of wine prepared by the chief of each separate horde. The ceremonies which took place during the sickness and funeral obsequies of the Scythian kings (who were buried at Gerrhi, at the extreme point to which navigation extended up the Borysthenês), partook of the same sanguinary disposition. It was the Scythian practice to put out the eyes of all their slaves; and the awkwardness of the Scythian frame, often overloaded with fat, together with extreme dirt of body, and the absence of all discriminating feature between one man and another, complete the
  • 36. brutish portrait.[462] Mare’s milk (with cheese made from it) seems to have been their chief luxury, and probably served the same purpose of procuring the intoxicating drink called kumiss, as at present among the Bashkirs and the Kalmucks.[463] If the habits of the Scythians were such as to create in the near observer no other feeling than repugnance, their force at least inspired terror. They appeared in the eyes of Thucydidês so numerous and so formidable, that he pronounces them irresistible, if they could but unite, by any other nation within his knowledge. Herodotus, too, conceived the same idea of a race among whom every man was a warrior and a practised horse-bowman, and who were placed by their mode of life out of all reach of an enemy’s attack.[464] Moreover, Herodotus does not speak meanly of their intelligence, contrasting them in favorable terms with the general stupidity of the other nations bordering on the Euxine. In this respect Thucydidês seems to differ from him. On the east, the Scythians of the time of Herodotus were separated only by the river Tanais from the Sarmatians, who occupied the territory for several days’ journey north-east of the Palus Mæôtis: on the south, they were divided by the Danube from the section of Thracians called Getæ. Both these nations were nomadic, analogous to the Scythians in habits, military efficiency, and fierceness: indeed, Herodotus and Hippokratês distinctly intimate that the Sarmatians were nothing but a branch of Scythians,[465] speaking a Scythian dialect, and distinguished from their neighbors on the other side of the Tanais, chiefly by this peculiarity,—that the women among them were warriors hardly less daring and expert than the men. This attribute of Sarmatian women, as a matter of fact, is well attested,—though Herodotus has thrown over it an air of suspicion not properly belonging to it, by his explanatory genealogical mythe, deducing the Sarmatians from a mixed breed between the Scythians and the Amazons. The wide extent of steppe eastward and north-eastward of the Tanais, between the Ural mountains and the Caspian, and beyond
  • 37. the possessions of the Sarmatians, was traversed by Grecian traders, even to a good distance in the direction of the Altai mountains,—the rich produce of gold, both in Altai and Ural, being the great temptation. First, according to Herodotus, came the indigenous nomadic nation called Budini, who dwelt to the northward of the Sarmatians,[466] and among whom were established a colony of Pontic Greeks, intermixed with natives, and called Gelôni; these latter inhabited a spacious town built entirely of wood. Beyond the Budini eastward dwelt the Thyssagetæ and the Jurkæ, tribes of hunters, and even a body of Scythians who had migrated from the territories of the regal Scythians. The Issêdones were the easternmost people respecting whom any definite information reached the Greeks; beyond them we find nothing but fable,[467]— the one-eyed Arimaspians, the gold-guarding Grypes, or Griffins, and the bald-headed Argippæi. It is impossible to fix with precision the geography of these different tribes, or to do more than comprehend approximatively their local bearings and relations to each other. But the best known of all is the situation of the Tauri (perhaps a remnant of the expelled Cimmerians), who dwelt in the southern portion of the Tauric Chersonesus (or Crimea), and who immolated human sacrifices to their native virgin goddess,—identified by the Greeks with Artemis, and serving as a basis for the affecting legend of Iphigeneia. The Tauri are distinguished by Herodotus from Scythians,[468] but their manners and state of civilization seem to have been very analogous. It appears also that the powerful and numerous Massagetæ, who dwelt in Asia on the plains eastward of the Caspian and southward of the Issêdones, were so analogous to the Scythians as to be reckoned as members of the same race by many of the contemporaries of Herodotus.[469] This short enumeration of the various tribes near the Euxine and the Caspian, as well as we can make them out, from the seventh to the fifth century B. C., is necessary for the comprehension of that double invasion of Scythians and Cimmerians which laid waste Asia between 630 and 610 B. C. We are not to expect from Herodotus,
  • 38. born a century and a half afterwards, any very clear explanations of this event, nor were all his informants unanimous respecting the causes which brought it about. But it is a fact perfectly within the range of historical analogy, that accidental aggregations of number, development of aggressive spirit, or failure in the means of subsistence, among the nomadic tribes of the Asiatic plains, have brought on the civilized nations of southern Europe calamitous invasions, of which the prime moving cause was remote and unknown. Sometimes a weaker tribe, flying before a stronger, has been in this manner precipitated upon the territory of a richer and less military population, so that an impulse originating in the distant plains of Central Tartary has been propagated until it reached the southern extremity of Europe, through successive intermediate tribes, a phenomenon especially exhibited during the fourth and fifth centuries of the Christian era, in the declining years of the Roman empire. A pressure so transmitted onward is said to have brought down the Cimmerians and Scythians upon the more southerly regions of Asia. The most ancient story in explanation of this incident seems to have been contained in the epic poem (now lost) called Arimaspia, of the mystic Aristeas of Prokonnêsus, composed apparently about 540 B. C. This poet, under the inspiration of Apollo, [470] undertook a pilgrimage to visit the sacred Hyperboreans (especial votaries of that god) in their elysium beyond the Rhipæan mountains; but he did not reach farther than the Issêdones. According to him, the movement, whereby the Cimmerians had been expelled from their possessions on the Euxine sea, began with the Grypes or Griffins in the extreme north,—the sacred character of the Hyperboreans beyond was incompatible with aggression or bloodshed. The Grypes invaded the Arimaspians, who on their part assailed their neighbors the Issêdones;[471] these latter moved southward or westward and drove the Scythians across the Tanais, while the Scythians, carried forward by this onset, expelled the Cimmerians from their territories along the Palus Mæotis and the Euxine.
  • 39. We see thus that Aristeas referred the attack of the Scythians upon the Cimmerians to a distant impulse proceeding in the first instance from the Grypes or Griffins; but Herodotus had heard it explained in another way, which he seems to think more correct,— the Scythians, originally occupants of Asia, or the regions east of the Caspian, had been driven across the Araxês, in consequence of an unsuccessful war with the Massagetæ, and precipitated upon the Cimmerians in Europe.[472] When the Scythian host approached, the Cimmerians were not agreed among themselves whether to resist or retire: the majority of the people were dismayed and wished to evacuate the territory, while the kings of the different tribes resolved to fight and perish at home. Those who were animated with this fierce despair, divided themselves along with the kings into two equal bodies and perished by each other’s hands near the river Tyras, where the sepulchres of the kings were yet shown in the time of Herodotus.[473] The mass of the Cimmerians fled and abandoned their country to the Scythians; who, however, not content with possession of the country, followed the fugitives across the Cimmerian Bosphorus from west to east, under the command of their prince Madyês son of Protothyês. The Cimmerians, coasting along the east of the Euxine sea and passing to the west of Mount Caucasus, made their way first into Kolchis, and next into Asia Minor, where they established themselves on the peninsula on the northern coast, near the site of the subsequent Grecian city of Sinôpê. But the Scythian pursuers, mistaking the course taken by the fugitives, followed the more circuitous route east of Mount Caucasus near to the Caspian sea;[474] which brought them, not into Asia Minor, but into Media. Both Asia Minor and Media became thus exposed nearly at the same time to the ravages of northern nomades. These two stories, representing the belief of Herodotus and Aristeas, involve the assumption that the Scythians were comparatively recent emigrants into the territory between the Ister and the Palus Mæotis. But the legends of the Scythians themselves,
  • 40. as well as those of the Pontic Greeks, imply the contrary of this assumption; and describe the Scythians as primitive and indigenous inhabitants of the country. Both legends are so framed as to explain a triple division, which probably may have prevailed, of the Scythian aggregate nationality, traced up to three heroic brothers: both also agree in awarding the predominance to the youngest brother of the three,[475] though in other respects, the names and incidents of the two are altogether different, The Scythians call themselves Skoloti. Such material differences, in the various accounts given to Herodotus of the Scythian and Cimmerian invasions of Asia, are by no means wonderful, seeing that nearly two centuries had elapsed between that event and his visit to the Pontus. That the Cimmerians —perhaps the northernmost portion of the great Thracian name, and conterminous with the Getæ on the Danube—were the previous tenants of much of the territory between the Ister and the Palus Mæotis, and that they were expelled in the seventh century B. C., by the Scythians, we may follow Herodotus in believing; but Niebuhr has shown that there is great intrinsic improbability in his narrative of the march of the Cimmerians into Asia Minor, and in the pursuit of these fugitives by the Scythians. That the latter would pursue at all, when an extensive territory was abandoned to them without resistance, is hardly supposable: that they should pursue and mistake their way, is still more difficult to believe: nor can we overlook the great difficulties of the road and the Caucasian passes, in the route ascribed to the Cimmerians.[476] Niebuhr supposes the latter to have marched into Asia Minor by the western side of the Euxine, and across the Thracian Bosphorus, after having been defeated in a decisive battle by the Scythians near the river Tyras, where their last kings fell and were interred.[477] Though this is both an easier route, and more in accordance with the analogy of other occupants expelled from the same territory, we must, in the absence of positive evidence, treat the point as unauthenticated. The inroad of the Cimmerians into Asia Minor was doubtless connected with their expulsion from the northern coast of the Euxine
  • 41. by the Scythians, but we may well doubt whether it was at all connected, as Herodotus had been told that it was, with the invasion of Media by the Scythians, except as happening near about the same time. The same great evolution of Scythian power, or propulsion by other tribes behind, may have occasioned both events, —brought about by different bodies of Scythians, but nearly contemporaneous. Herodotus tells us two facts respecting the Cimmerian emigrants into Asia Minor. They committed destructive, though transient, ravages in many parts of Paphlagonia, Phrygia, Lydia, and Ionia,— and they occupied permanently the northern peninsula,[478] whereon the Greek city of Sinôpê was afterwards planted. Had the elegies of the contemporary Ephesian poet Kallinus been preserved, we should have known better how to appreciate these trying times: he strove to keep alive the energy of his countrymen against the formidable invaders.[479] From later authors, who probably, had these poems before them, we learn that the Cimmerian host, having occupied the Lydian chief town Sardis (its inaccessible acropolis defied them), poured with their wagons into the fertile valley of the Kaïster, took and sacked Magnêsia on the Mæander, and even threatened the temple of Artemis at Ephesus. But the goddess so well protected her own town and sanctuary,[480] that Lygdamis the leader of the Cimmerians, whose name marks him for a Greek, after a season of prosperous depredation in Lydia and Ionia, conducting his host into the mountainous regions of Kilikia, was there overwhelmed and slain. But though these marauders perished, the Cimmerian settlers in the territory near Sinôpê remained; and Ambrôn, the first Milesian œkist who tried to colonize that spot, was slain by them, if we may believe Skymnus. They are not mentioned afterwards, but it seems not unreasonable to believe that they appear under the name of the Chalybes, whom Herodotus mentions along that coast between the Mariandynians and Paphlagonians, and whom Mela notices as adjacent to Sinôpê and Amisus.[481] Other authors place the Chalybes on several different points, more to the east, though along the same parallel of latitude,—between the Mosynœki and Tibarêni,
  • 42. —near the river Thermôdôn,—and on the northern boundary of Armenia, near the sources of the Araxês; but it is only Herodotus and Mela who recognize Chalybes westward of the river Halys and the Paphlagonians, near to Sinôpê. These Chalybes were brave mountaineers, though savage in manners; distinguished as producers and workers of the iron which their mountains afforded. In the conceptions of the Greeks, as manifested in a variety of fabulous notices, they are plainly connected with Scythians or Cimmerians; whence it seems probable that this connection was present to the mind of Herodotus in regard to the inland population near Sinôpê.[482] Herodotus seems to have conceived only one invasion of Asia by the Cimmerians, during the reign of Ardys in Lydia. Ardys was succeeded by his son Sadyattês, who reigned twelve years; and it was Alyattês, son and successor of Sadyattês, according to Herodotus, who expelled the Cimmerians from Asia.[483] But Strabo seems to speak of several invasions, in which the Trêres, a Thracian tribe, were concerned, and which are not clearly discriminated; while Kallisthenês affirmed that Sardis had been taken by the Trêres and Lykians.[484] We see only that a large and fair portion of Asia Minor was for much of this seventh century B. C. in possession of these destroying nomads, who, while on the one hand they afflicted the Ionic Greeks, on the other hand indirectly befriended them by retarding the growth of the Lydian monarchy. The invasion of Upper Asia by the Scythians appears to have been nearly simultaneous with that of Asia Minor by the Cimmerians, but more ruinous and longer protracted. The Median king Kyaxarês, called away from the siege of Nineveh to oppose them, was totally defeated; and the Scythians became full masters of the country. They spread themselves over the whole of Upper Asia, as far as Palestine and the borders of Egypt, where Psammetichus the Egyptian king met them, and only redeemed his kingdom from invasion by prayers and costly presents. In their return, a detachment of them sacked the temple of Aphroditê at Askalon; an
  • 43. act of sacrilege which the goddess avenged both upon the plunderers and their descendants, to the third and fourth generation. Twenty-eight years did their dominion in Upper Asia continue,[485] with intolerable cruelty and oppression; until, at length, Kyaxarês and the Medes found means to entrap the chiefs into a banquet, and slew them in the hour of intoxication. The Scythian host once expelled, the Medes resumed their empire. Herodotus tells us that these Scythians returned to the Tauric Chersonese, where they found that, during their long absence, their wives had intermarried with the slaves, while the new offspring which had grown up refused to readmit them. A deep trench had been drawn across a line[486] over which their march lay, and the new-grown youth defended it with bravery, until at length,—so the story runs,—the returning masters took up their whips instead of arms, and scourged the rebellious slaves into submission. Little as we know about the particulars of these Cimmerian and Scythian inroads, they deserve notice as the first—at least the first historically known—among the numerous invasions of cultivated Asia and Europe by the nomads of Tartary. Huns, Avars, Bulgarians, Magyars, Turks, Mongols, Tartars, etc., are found in subsequent centuries repeating the same infliction, and establishing a dominion both more durable, and not less destructive, than the transient scourge of the Scythians during the reign of Kyaxarês. After the expulsion of the Scythians from Asia, the full extent and power of the Median empire was reëstablished; and Kyaxarês was enabled again to besiege Nineveh. He took that great city, and reduced under his dominion all the Assyrians except those who formed the kingdom of Babylon. This conquest was achieved towards the close of his reign, and he bequeathed the Median empire, at the maximum of its grandeur, to his son Astyagês, in 595 B. C.[487] As the dominion of the Scythians in Upper Asia lasted twenty eight years before they were expelled by Kyaxarês, so also the inroads of the Cimmerians through Asia Minor, which had begun
  • 44. during the reign of the Lydian king Ardys, continued through the twelve years of the reign of his son Sadyattês (629-617 B. C.), and were finally terminated by Alyattês, son of the latter.[488] Notwithstanding the Cimmerians, however, Sadyattês was in a condition to prosecute a war against the Grecian city of Milêtus, which continued during the last seven years of his reign, and which he bequeathed to his son and successor. Alyattês continued the war for five years longer. So feeble was the sentiment of union among the various Grecian towns on the Asiatic coast, that none of them would lend any aid to Milêtus except the Chians, who were under special obligations to Milêtus for previous aid in a contest against Erythræ: and the Milesians unassisted were no match for the Lydian army in the field, though their great naval strength placed them out of all danger of a blockade; and we must presume that the erection of those mounds of earth against the walls, whereby the Persian Harpagus vanquished the Ionian cities half a century afterwards, was then unknown to the Lydians. For twelve successive years the Milesian territory was annually overrun and ravaged, previous to the gathering in of the crop. The inhabitants, after having been defeated in two ruinous battles, gave up all hope of resisting the devastation, so that the task of the invaders became easy, and the Lydian army pursued their destructive march to the sound of flutes and harps. They ruined the crops and the fruit-trees, but Alyattês would not allow the farm-buildings or country-houses to be burnt, in order that the means of production might still be preserved, to be again destroyed during the following season. By such unremitting devastation the Milesians were reduced to distress and famine, in spite of their command of the sea; and the fate which afterwards overtook them during the reign of Crœsus, of becoming tributary subjects to the throne of Sardis, would have begun half a century earlier, had not Alyattês unintentionally committed a profanation against the goddess Athênê. Her temple at Assêssus accidentally took fire, and was consumed, when his soldiers on a windy day were burning the Milesian standing corn. Though no one took notice of this incident at the time, yet Alyattês on his return to Sardis was smitten with prolonged sickness. Unable to obtain relief, he
  • 45. despatched envoys to seek humble advice from the god at Delphi; but the Pythian priestess refused to furnish any healing suggestions until he should have rebuilt the burnt temple of Athênê,—and Periander, at that time despot of Corinth, having learned the tenor of this reply, transmitted private information of it to Thrasybulus, despot of Milêtus, with whom he was intimately allied. Presently there arrived at Milêtus a herald on the part of Alyattês, proposing a truce for the special purpose of enabling him to rebuild the destroyed temple,—the Lydian monarch believing the Milesians to be so poorly furnished with subsistence that they would gladly embrace this temporary relief. But the herald on his arrival found abundance of corn heaped up in the agora, and the citizens engaged in feasting and enjoyment: for Thrasybulus had caused all the provision in the town, both public and private, to be brought out, in order that the herald might see the Milesians in a condition of apparent plenty, and carry the news of it to his master. The stratagem succeeded. Alyattês, under the persuasion that his repeated devastations inflicted upon the Milesians no sensible privations, abandoned his hostile designs, and concluded with them a treaty of amity and alliance. It was his first proceeding to build two temples to Athênê, in place of the one which had been destroyed, and he then, forthwith, recovered from his protracted malady. His gratitude for the cure was testified by the transmission of a large silver bowl, with an iron footstand welded together by the Chian artist Glaukus,—the inventor of the art of thus joining together pieces of iron.[489] Alyattês is said to have carried on other operations against some of the Ionic Greeks: he took Smyrna, but was defeated in an inroad on the territory of Klazomenæ.[490] But on the whole, his long reign of fifty-seven years was one of tranquillity to the Grecian cities on the coast, though we hear of an expedition which he undertook against Karia.[491] He is reported to have been during youth of overweening insolence, but to have acquired afterwards a just and improved character. By an Ionian wife he became father of Crœsus, whom, even during his lifetime, he appointed satrap of the town of Adramyttium, and the neighboring plain of Thêbê. But he had also
  • 46. other wives and other sons, and one of the latter, Adramytus, is reported as the founder of Adramyttium.[492] How far his dominion in the interior of Asia Minor extended, we do not know, but very probably his long and comparatively inactive reign may have favored the accumulation of those treasures which afterwards rendered the wealth of Crœsus so proverbial. His monument, an enormous pyramidal mound upon a stone base, erected near Sardis, by the joint efforts of the whole Sardian population, was the most memorable curiosity in Lydia during the time of Herodotus; it was inferior only to the gigantic edifices of Egypt and Babylon.[493] Crœsus obtained the throne, at the death of his father, by appointment from the latter. But there was a party among the Lydians who had favored the pretensions of his brother Pantaleon; one of the richest chiefs of which party was put to death afterwards by the new king, under the cruel torture of a spiked carding- machine,—his property confiscated.[494] The aggressive reign of Crœsus, lasting fourteen years (559-545 B. C.), formed a marked contrast to the long quiescence of his father during a reign of fifty- seven years. Pretences being easily found for war against the Asiatic Greeks, Crœsus attacked them one after the other. Unfortunately, we know neither the particulars of these successive aggressions, nor the previous history of the Ionic cities, so as to be able to explain how it was that the fifth of the Mermnad kings of Sardis met with such unqualified success, in an enterprise which his predecessors had attempted in vain. Milêtus alone, with the aid of Chios, had resisted Alyattês and Sadyattês for eleven years,—and Crœsus possessed no naval force, any more than his father and grandfather. But on this occasion, not one of the towns can have displayed the like individual energy. In regard to the Milesians, we may perhaps suspect that the period now under consideration was comprised in that long duration of intestine conflict which Herodotus represents (though without defining exactly when) to have crippled the forces of the city for two generations, and which was at length appeased by a memorable
  • 47. decision of some arbitrators invited from Paros. These latter, called in by mutual consent of the exhausted antagonist parties at Milêtus, found both the city and her territory in a state of general neglect and ruin. But on surveying the lands, they discovered some which still appeared to be tilled with undiminished diligence and skill; to the proprietors of these lands they consigned the government of the town, in the belief that they would manage the public affairs with as much success as their own.[495] Such a state of intestine weakness would partly explain the easy subjugation of the Milesians by Crœsus; while there was little in the habits of the Ionic cities to present the chance of united efforts against a common enemy. These cities, far from keeping up any effective political confederation, were in a state of habitual jealousy of each other, and not unfrequently in actual war.[496] The common religious festivals,— the Deliac festival as well as the Pan-Ionia, and afterwards the Ephesia in place of the Delia,—seem to have been regularly frequented by all the cities throughout the worst of times. But these assemblies had no direct political function, nor were they permitted to control that sentiment of separate city-autonomy which was paramount in the Greek mind,—though their influence was extremely precious in calling forth social sympathies. Apart from the periodical festival, meetings for special emergencies were held at the Pan-Ionic temple; but from such meetings any city, not directly implicated, kept aloof.[497] As in this case, so in others not less critical throughout the historical period, the incapacity of large political combination was the source of constant danger, and ultimately proved the cause of ruin, to the independence of all the Grecian states. Herodotus warmly commends the advice given by Thalês to his Ionic countrymen,—and given, to use his remarkable expression, “before the ruin of Ionia,”[498]—that a common senate, invested with authority over all the twelve cities, should be formed within the walls of Teôs, as the most central in position; and that all the other cities should account themselves mere demes of this aggregate commonwealth, or polis. Nor can we doubt that such was the unavailing aspiration of many a patriot of Milêtus or Ephesus,
  • 48. even before the final operations of Crœsus were opened against them. That prince attacked the Greek cities successively, finding or making different pretences for hostility against each. He began with Ephesus, which is said to have been then governed by a despot of harsh and oppressive character, named Pindarus, whose father Melas had married a daughter of Alyattês, and who was, therefore, himself nephew of Crœsus.[499] The latter, having in vain invited Pindarus and the Ephesians to surrender the town, brought up his forces and attacked the walls: one of the towers being overthrown, the Ephesians abandoned all hope of defending their town, and sought safety by placing it under the guardianship of Artemis, to whose temple they carried a rope from the walls,—a distance not less than seven furlongs. They at the same time sent a message of supplication to Crœsus, who is said to have granted them the preservation of their liberties, out of reverence to the protection of Artemis; exacting at the same time that Pindarus should quit the place. Such is the tale of which we find a confused mention in Ælian and Polyænus; but Herodotus, while he notices the fact of the long rope whereby the Ephesians sought to place themselves in contact with their divine protectress, does not indicate that Crœsus was induced to treat them more favorably. Ephesus, like all the other Grecian towns on the coast, was brought under subjection and tribute to him.[500] How he dealt with them, and what degree of coercive precaution he employed either to insure subjection or collect tribute, the brevity of the historian does not acquaint us. But they were required partially at least, if not entirely, to raze their fortifications; for on occasion of the danger which supervened a few years afterwards from Cyrus, they are found practically unfortified. [501] Thus completely successful in his aggressions on the continental Asiatic Greeks, Crœsus conceived the idea of assembling a fleet, for the purpose of attacking the islanders of Chios and Samos, but was convinced,—as some said, by the sarcastic remark of one of the
  • 49. seven Greek sages, Bias or Pittakus—of the impracticability of the project. He carried his arms, however, with full success, over other parts of the continent of Asia Minor, until he had subdued the whole territory within the river Halys, excepting only the Kilikians and the Lykians. The Lydian empire thus reached the maximum of its power, comprehending, besides the Æolic, Ionic, and Doric Greeks on the coast of Asia Minor, the Phrygians, Mysians, Mariandynians, Chalybes, Paphlagonians, Thynian and Bithynian Thracians, Karians, and Pamphylians. And the treasures amassed by Crœsus at Sardis, derived partly from this great number of tributaries, partly from mines in various places as well as the auriferous sands of the Paktôlus, exceeded anything which the Greeks had ever before known. We learn, from the brief but valuable observations of Herodotus, to appreciate the great importance of these conquests of Crœsus, with reference not merely to the Grecian cities actually subjected, but also indirectly to the whole Grecian world. “Before the reign of Crœsus, observes the historian, all the Greeks were free; it was by him first that Greeks were subdued into tribute.” And he treats this event as the initial phenomenon of the series, out of which grew the hostile relations between the Greeks on one side, and Asia as represented by the Persians on the other, which were uppermost in the minds of himself and his contemporaries. It was in the case of Crœsus that the Greeks were first called upon to deal with a tolerably large barbaric aggregate under a warlike and enterprising prince, and the result was such as to manifest the inherent weakness of their political system, from its incapacity of large combination. The separated autonomous cities could only maintain their independence either through similar disunion on the part of barbaric adversaries, or by superiority on their own side of military organization as well as of geographical position. The situation of Greece proper and of the islands was favorable to the maintenance of such a system,—not so the shores
  • 50. of Asia with a wide interior country behind. The Ionic Greeks were at this time different from what they became during the ensuing century, little inferior in energy to Athens or to the general body of European Greeks, and could doubtless have maintained their independence, had they cordially combined. But it will be seen hereafter that the Greek colonies,—planted as isolated settlements, and indisposed to political union, even when neighbors,—all of them fell into dependence so soon as attack from the interior came to be powerfully organized; especially if that organization was conducted by leaders partially improved through contact with the Greeks themselves. Small autonomous cities maintain themselves so long as they have only enemies of the like strength to deal with: but to resist larger aggregates requires such a concurrence of favorable circumstances as can hardly remain long without interruption. And the ultimate subjection of entire Greece, under the kings of Macedon, was only an exemplification on the widest scale of this same principle. The Lydian monarchy under Crœsus, the largest with which the Greeks had come into contact down to that moment, was very soon absorbed into a still larger,—the Persian; of which the Ionic Greeks, after unavailing resistance, became the subjects. The partial sympathy and aid which they obtained from the independent or European Greeks, their western neighbors, followed by the fruitless attempt on the part of the Persian king to add these latter to his empire, gave an entirely new turn to Grecian history and proceedings. First, it necessitated a degree of central action against the Persians which was foreign to Greek political instinct; next it opened to the noblest and most enterprising section of the Hellenic name,—the Athenians,—an opportunity of placing themselves at the head of this centralizing tendency: while a concurrence of circumstances, foreign and domestic, imparted to them at the same time that extraordinary and many-sided impulse, combining action with organization, which gave such brilliancy to the period of Herodotus and Thucydidês. It is thus that most of the splendid phenomena of Grecian history grew, directly or indirectly, out of the
  • 51. reluctant dependence in which the Asiatic Greeks were held by the inland barbaric powers, beginning with Crœsus. These few observations will suffice to intimate that a new phase of Grecian history is now on the point of opening. Down to the time of Crœsus, almost everything which is done or suffered by the Grecian cities bears only upon one or other of them separately: the instinct of the Greeks repudiates even the modified forms of political centralization, and there are no circumstances in operation to force it upon them. Relation of power and subjection exist, between a strong and a weak state, but no tendency to standing political coördination. From this time forward, we shall see partial causes at work, tending in this direction, and not without considerable influence; though always at war with the indestructible instinct of the nation, and frequently counteracted by selfishness and misconduct on the part of the leading cities.
  • 52. CHAPTER XVIII. PHENICIANS. Of the Phenicians, Assyrians, and Egyptians, it is necessary for me to speak so far as they acted upon the condition, or occupied the thoughts, of the early Greeks, without undertaking to investigate thoroughly their previous history. Like the Lydians, all three became absorbed into the vast mass of the Persian empire, retaining, however, to a great degree, their social character and peculiarities after having been robbed of their political independence. The Persians and Medes,—portions of the Arian race, and members of what has been classified, in respect of language, as the great Indo-European family,—occupied a part of the vast space comprehended between the Indus on the east, and the line of Mount Zagros (running eastward of the Tigris and nearly parallel with that river) on the west. The Phenicians as well as the Assyrians belonged to the Semitic, Aramæan, or Syro-Arabian family; comprising, besides, the Syrians, Jews, Arabians, and in part the Abyssinians. To what established family of the human race the swarthy and curly- haired Egyptians are to be assigned, has been much disputed; we cannot reckon them as members of either of the two preceding, and the most careful inquiries render it probable that their physical type was something purely African, approximating in many points to that of the negro.[502] It has already been remarked that the Phenician merchant and trading vessel figures in the Homeric poems as a well-known visitor, and that the variegated robes and golden ornaments fabricated at Sidon are prized among the valuable ornaments belonging to the chiefs.[503] We have reason to conclude generally, that in these early
  • 53. times, the Phenicians traversed the Ægean sea habitually, and even formed settlements for trading and mining purposes upon some of its islands: on Thasos, especially, near the coast of Thrace, traces of their abandoned gold-mines were visible even in the days of Herodotus, indicating both persevering labor and considerable length of occupation. But at the time when the historical era opens, they seem to have been in course of gradual retirement from these regions,[504] and their commerce had taken a different direction. Of this change we can furnish no particulars; but we may easily understand that the increase of the Grecian marine, both warlike and commercial, would render it inconvenient for the Phenicians to encounter such enterprising rivals,—piracy (or private war at sea) being then an habitual proceeding, especially with regard to foreigners. The Phenician towns occupied a narrow strip of the coast of Syria and Palestine, about one hundred and twenty miles in length, never more, and generally much less, than twenty miles in breadth,— between Mount Libanus and the sea. Aradus—on an islet, with Antaradus and Marathus over against it on the main land—was the northernmost, and Tyre the southernmost (also upon a little island, with Palæ-Tyrus and a fertile adjacent plain over against it). Between the two were situated Sidon, Berytus, Tripolis, and Byblus, besides some smaller towns[505] attached to one or other of these last mentioned, and several islands close to the coast occupied in like manner; while the colony of Myriandrus lay farther north, near the borders of Kilikia. Whether Sidon or Tyre was the most ancient, seems not determinable: if it be true as some authorities affirmed, that Tyre was originally planted from Sidon, the colony must have grown so rapidly as to surpass its metropolis in power and consideration, for it became the chief of all the Phenician towns.[506] Aradus, the next in importance after these two, was founded by exiles from Sidon, and all the rest either by Tyrian or Sidonian settlers. Within this confined territory was concentrated a greater degree of commercial wealth and enterprise, and manufacturing ingenuity, than could be found in any other portion of the
  • 54. contemporary world. Each town was an independent community, having its own surrounding territory and political constitution and its own hereditary prince,[507] though the annals of Tyre display many instances of princes assassinated by men who succeeded them on the throne. Tyre appears to have enjoyed a certain presiding, perhaps a controlling authority, over all of them, which was not always willingly submitted to; and examples occur in which the inferior towns, when Tyre was pressed by a foreign enemy,[508] took the opportunity of revolting, or at least stood aloof. The same difficulty of managing satisfactorily the relations between a presiding town and its confederates, which Grecian history manifests, is found also to prevail in Phenicia, and will be hereafter remarked in regard to Carthage; while the same effects are also perceived, of the autonomous city polity, in keeping alive the individual energies and regulated aspirations of the inhabitants. The predominant sentiment of jealous town-isolation is forcibly illustrated by the circumstances of Tripolis, established jointly by Tyre, Sidon, and Aradus. It consisted of three distinct towns, each one furlong apart from the other two, and each with its own separate walls; though probably constituting to a certain extent one political community, and serving as a place of common meeting and deliberation for the entire Phenician name.[509] The outlying promontories of Libanus and Anti- Libanus touched the sea along the Phenician coast, and those mountainous ranges, while they rendered a large portion of the very confined area unfit for cultivation of corn, furnished what was perhaps yet more indispensable,—abundant supplies of timber for ship-building: the entire want of all wood in Babylonia, except the date-palm, restricted the Assyrians of that territory from maritime traffic on the Persian gulf. It appears, however, that the mountains of Lebanon also afforded shelter to tribes of predatory Arabs, who continually infested both the Phenician territory and the rich neighboring plain of Cœle-Syria.[510] The splendid temple of that great Phenician god (Melkarth) whom the Greeks called Hêraklês,[511] was situated in Tyre, and the Tyrians affirmed that its establishment had been coeval with the first
  • 55. foundation of the city, two thousand three hundred years before the time of Herodotus. This god is the companion and protector of their colonial settlements, and the ancestor of the Phœnico-Libyan kings: we find him especially at Carthage, Gadês, and Thasos.[512] Some supposed that they had migrated to their site on the Mediterranean coast, from previous abodes near the mouth of the Euphrates,[513] or on islands (named Tylus and Aradus) of the Persian gulf, while others treated the Mediterranean Phenicians as original, and the others as colonists. Whether such be the fact or not, history knows them in no other portion of Asia earlier than in Phenicia proper. Though the invincible industry and enterprise of the Phenicians maintained them as a people of importance down to the period of the Roman empire, yet the period of their widest range and greatest efficiency is to be sought much earlier,—anterior to 700 B. C. In these remote times they and their colonists were the exclusive navigators of the Mediterranean: the rise of the Greek maritime settlements banished their commerce to a great degree from the Ægean sea, and embarrassed it even in the more westerly waters. Their colonial establishments were formed in Africa, Sicily, Sardinia, the Balearic Isles, and Spain: the greatness as well as the antiquity of Carthage, Utica, and Gadês, attest the long-sighted plans of Phenician traders, even in days anterior to the 1st Olympiad. We trace the wealth and industry of Tyre, and the distant navigation of her vessels through the Red sea and along the coast of Arabia, back to the days of David and Solomon. And as neither Egyptians, Assyrians, Persians, nor Indians, addressed themselves to a seafaring life, so it seems that both the importation and the distribution of the products of India and Arabia into Western Asia and Europe, was performed by the Idumæan Arabs, between Petra and the Red sea,—by the Arabs of Gerrha on the Persian gulf, joined as they were in later times by a body of Chaldæan exiles from Babylonia,—and by the more enterprising Phenicians of Tyre and Sidon in these two seas as well as in the Mediterranean.[514]
  • 56. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com