Translated message

A translation of this page exists in English.

JBoss のデプロイメント内でファイルにアクセスする方法

Solution Verified - Updated -

Issue

  • デプロイメントが爆発的に増えた (ディレクトリ構造に抽出された) 場合に限定して、以下のコードでデプロイのリソースにアクセスすることはできませんか? EAR などの jar アーカイブの形式でデプロイする際に、このリソースを取得することができません。

    URL url = SomeClass.class.getResource("SomeResource");
    FileInputStream stream = new FileInputStream (new File (url));
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.0.x
    • 6.1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content