<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.8.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>293</ContextCount>
  <ElementCount>262</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>60</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document And Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document And Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Consolidated Statements Of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfIncome</Role>
      <ShortName>Consolidated Statements Of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00205 - Statement - Consolidated Statements Of Income (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfIncomeParenthetical</Role>
      <ShortName>Consolidated Statements Of Income (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00300 - Statement - Consolidated Statements Of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Consolidated Statements Of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00400 - Statement - Consolidated Statements Of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements Of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>00405 - Statement - Consolidated Statements Of Cash Flows (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfCashFlowsParenthetical</Role>
      <ShortName>Consolidated Statements Of Cash Flows (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>00500 - Statement - Consolidated Statements Of Changes In Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquity</Role>
      <ShortName>Consolidated Statements Of Changes In Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>00505 - Statement - Consolidated Statements Of Changes In Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements Of Changes In Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Basis Of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBasisOfPresentation</Role>
      <ShortName>Basis Of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Use Of Estimates</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureUseOfEstimates</Role>
      <ShortName>Use Of Estimates</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Earnings Per Common Share (EPS)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEps</Role>
      <ShortName>Earnings Per Common Share (EPS)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Stock Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureStockBasedCompensation</Role>
      <ShortName>Stock Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Capital Notes</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureCapitalNotes</Role>
      <ShortName>Capital Notes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureSecurities</Role>
      <ShortName>Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Business Segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBusinessSegments</Role>
      <ShortName>Business Segments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Loans, Allowance For Loan Losses And OREO</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreo</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Earnings Per Common Share (EPS) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEpsTables</Role>
      <ShortName>Earnings Per Common Share (EPS) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEps</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30403 - Disclosure - Stock Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureStockBasedCompensationTables</Role>
      <ShortName>Stock Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureStockBasedCompensation</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureSecuritiesTables</Role>
      <ShortName>Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureSecurities</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Business Segments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBusinessSegmentsTables</Role>
      <ShortName>Business Segments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureBusinessSegments</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>30903 - Disclosure - Loans, Allowance For Loan Losses And OREO (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreo</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Basis Of Presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBasisOfPresentationDetails</Role>
      <ShortName>Basis Of Presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureBasisOfPresentation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Earnings Per Common Share (EPS) (Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEpsEarningsPerShareDetails</Role>
      <ShortName>Earnings Per Common Share (EPS) (Earnings Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEpsTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Earnings Per Common Share (EPS) (Schedule Of Antidilutive Securities Excluded From Computation Of Earnings Per Share) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEpsScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareDetails</Role>
      <ShortName>Earnings Per Common Share (EPS) (Schedule Of Antidilutive Securities Excluded From Computation Of Earnings Per Share) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureEarningsPerCommonShareEpsTables</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Stock Based Compensation (Summary Of Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureStockBasedCompensationSummaryOfStockOptionActivityDetails</Role>
      <ShortName>Stock Based Compensation (Summary Of Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureStockBasedCompensationTables</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Fair Value Measurements (Fair Value Assets Measured On Recurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsFairValueAssetsMeasuredOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Fair Value Assets Measured On Recurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Fair Value Measurements (Impaired Loans And Other Real Estate Owned Measured At Fair Value On A Nonrecurring Basis) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsImpairedLoansAndOtherRealEstateOwnedMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements (Impaired Loans And Other Real Estate Owned Measured At Fair Value On A Nonrecurring Basis) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40503 - Disclosure - Fair Value Measurements (Information Regarding Quantitative Inputs Used To Value Assets Classified As Level 3) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsInformationRegardingQuantitativeInputsUsedToValueAssetsClassifiedAsLevel3Details</Role>
      <ShortName>Fair Value Measurements (Information Regarding Quantitative Inputs Used To Value Assets Classified As Level 3) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40505 - Disclosure - Fair Value Measurements (Fair Value Carrying And Notional Amounts) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsFairValueCarryingAndNotionalAmountsDetails</Role>
      <ShortName>Fair Value Measurements (Fair Value Carrying And Notional Amounts) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureFairValueMeasurementsTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Capital Notes (Narrative) (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureCapitalNotesNarrativeDetails</Role>
      <ShortName>Capital Notes (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureCapitalNotes</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Securities (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureSecuritiesNarrativeDetails</Role>
      <ShortName>Securities (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureSecuritiesTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Securities (Summary Of Securities Held-To-Maturity And Securities Available-For-Sale) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureSecuritiesSummaryOfSecuritiesHeldToMaturityAndSecuritiesAvailableForSaleDetails</Role>
      <ShortName>Securities (Summary Of Securities Held-To-Maturity And Securities Available-For-Sale) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureSecuritiesTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40703 - Disclosure - Securities (Gross Unrealized Losses And Fair Value Of The Bank's Investments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureSecuritiesGrossUnrealizedLossesAndFairValueOfBankSInvestmentsDetails</Role>
      <ShortName>Securities (Gross Unrealized Losses And Fair Value Of The Bank's Investments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureSecuritiesTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Business Segments (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBusinessSegmentsNarrativeDetails</Role>
      <ShortName>Business Segments (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureBusinessSegmentsTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Business Segments (Schedule Of Segment Reporting Information, By Segment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureBusinessSegmentsScheduleOfSegmentReportingInformationBySegmentDetails</Role>
      <ShortName>Business Segments (Schedule Of Segment Reporting Information, By Segment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureBusinessSegmentsTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Loans, Allowance For Loan Losses And OREO (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoNarrativeDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40902 - Disclosure - Loans, Allowance For Loan Losses And OREO (Summary Of Loans, Net) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoSummaryOfLoansNetDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Summary Of Loans, Net) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>40903 - Disclosure - Loans, Allowance For Loan Losses And OREO (Loans On Non-Accrual Status) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoLoansOnNonAccrualStatusDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Loans On Non-Accrual Status) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>40904 - Disclosure - Loans, Allowance For Loan Losses And OREO (Changes In OREO Balance) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoChangesInOreoBalanceDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Changes In OREO Balance) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>40905 - Disclosure - Loans, Allowance For Loan Losses And OREO (Impaired Loans) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoImpairedLoansDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Impaired Loans) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>40907 - Disclosure - Loans, Allowance For Loan Losses And OREO (Allowance For Loan Losses And Recorded Investment In Loans) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoAllowanceForLoanLossesAndRecordedInvestmentInLoansDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Allowance For Loan Losses And Recorded Investment In Loans) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>40908 - Disclosure - Loans, Allowance For Loan Losses And OREO (Age Analysis Of Past Due Financing Receivables) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoAgeAnalysisOfPastDueFinancingReceivablesDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Age Analysis Of Past Due Financing Receivables) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="botj-20170930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>40909 - Disclosure - Loans, Allowance For Loan Losses And OREO (Credit Quality Information-By Class) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoCreditQualityInformationByClassDetails</Role>
      <ShortName>Loans, Allowance For Loan Losses And OREO (Credit Quality Information-By Class) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofthejames.com/role/DisclosureLoansAllowanceForLoanLossesAndOreoTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>botj-20170930.xml</File>
    <File>botj-20170930.xsd</File>
    <File>botj-20170930_cal.xml</File>
    <File>botj-20170930_def.xml</File>
    <File>botj-20170930_lab.xml</File>
    <File>botj-20170930_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2014-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2016-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
