cari

Rumah  >  Soal Jawab  >  teks badan

java - Eclipse 错误:Path must include project and resource name

最近硬盘上同一位置的代码同时在windows和linux的eclipse里导入运行了。

从linux回到windows系统,发现eclipse报错了。

重新编译,update,clean都没法解决

StackOverflow上的答案是这样的:

This was caused by locally defined environment variable called $BROOT which was set in ~/.bashrc, and then picked up by the maven pom.xml. The environment variable put the output directory of the project outside the eclipse workspace, which is not how Eclipse likes to do things.

The solution was to unset the environment variable. This is the reason it works in Windows because Windows wouldn't know anything about ~/.bashrc.

但是不知道怎么unset the environment variable

PHPzPHPz2888 hari yang lalu907

membalas semua(3)saya akan balas

  • PHP中文网

    PHP中文网2017-04-18 10:30:34

    Akhirnya, saya mendapati bahawa apabila memulakan eclipse di bawah Ubuntu, laluan fail di bawah tingkap telah digunakan dan laluan ke pemacu E: telah dijana dalam direktori projek. Dan ia tidak boleh dipadamkan di bawah Windows. Kembali ke Ubuntu dan padamkannya, ia akan baik-baik saja

    balas
    0
  • PHP中文网

    PHP中文网2017-04-18 10:30:34

    Padamkan
    .setting/ folder
    .fail classpath
    .fail projek

    dalam direktori projek

    Kemudian import semula projek maven ke dalam eclipse

    balas
    0
  • PHPz

    PHPz2017-04-18 10:30:34

    Untuk maven, simpan sahaja fail yang anda tulis, tetapi bukan fail yang dihasilkan oleh IDE

    balas
    0
  • Batalbalas