How to use relative paths for projects added to an Eclipse workspace?

后端 未结 5 1617
独厮守ぢ
独厮守ぢ 2020-12-11 04:32

I am working on some Eclipse projects that are stored on a USB key. I have added them to a workspace whose root folder is also on the USB key, but the projects are not locat

5条回答
  •  忘掉有多难
    2020-12-11 05:02

    In my experience it will break at some time if you try to "hack" the metadata of eclipse.

    Consider the substcommand in windows (As you mention drive letter I assume windows)

    create a bat file containing

    subst N: .
    

    Running this will mount the current dir as N: So You can place this on the usb drive, and run that prior to running eclipse, then You will always find the same content on drive N:

    To remove the mount do

    subst /D N:
    

    You might consider making a bat file that mount N:, start eclipse and after eclipse exit unmount N: something like

    startMyProject.bat:

    subst N: .
    N:/eclipse 
    subst /D N:
    

提交回复
热议问题