Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.