recherche

Maison  >  Questions et réponses  >  le corps du texte

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 Il y a quelques jours906

répondre à tous(3)je répondrai

  • PHP中文网

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

    Enfin, j'ai découvert que lors du démarrage d'Eclipse sous Ubuntu, le chemin du fichier sous Windows était utilisé et qu'un chemin vers le lecteur E: était généré dans le répertoire du projet. Et il ne peut pas être supprimé sous Windows. Retournez sur Ubuntu et supprimez-le, tout ira bien

    répondre
    0
  • PHP中文网

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

    Supprimez le dossier
    .settings/
    fichier .classpath
    fichier .project

    dans le répertoire du projet

    Puis réimportez le projet maven dans Eclipse

    répondre
    0
  • PHPz

    PHPz2017-04-18 10:30:34

    Pour maven, conservez simplement les fichiers que vous avez écrits, mais pas ceux générés par l'EDI

    répondre
    0
  • Annulerrépondre