xjtlujoe
V2EX  ›  问与答

idea 的图片文件夹放在哪里啊?

  •  
  •   xjtlujoe · Oct 28, 2016 · 5833 views
    This topic created in 3665 days ago, the information mentioned may be changed or developed.

    放到 src 下不行,调用不到,新建一个文件夹也不行。求解。

    5 replies  •  2016-10-28 13:34:03 +08:00
    fan123199
    fan123199
    Oct 28, 2016 via Android
    1
    能具体点么?是 intellij 吗?图片要干嘛?
    fan123199
    fan123199
    Oct 28, 2016 via Android
    2
    jar 内的文件要用 getResource 来获取。
    xjtlujoe
    xjtlujoe
    OP
    Oct 28, 2016 via Android
    3
    @fan123199 对 图片在代码中要调用,普通 swing 界面
    inoris
    inoris
    Oct 28, 2016
    4
    @xjtlujoe 路径相对于程序运行的工作目录。
    xjtlujoe
    xjtlujoe
    OP
    Oct 28, 2016 via Android
    5
    @inoris 有了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1257 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:24 · PVG 01:24 · LAX 09:24 · JFK 12:24
    ♥ Do have faith in what you're doing.