'export' is not recognized as an internal or external command

后端 未结 5 722
萌比男神i
萌比男神i 2021-01-31 13:40

I need to set Maven options in machine. I ran following command and I got \'export\' is not recognized as an internal or external command

export MAV         


        
相关标签:
5条回答
  • 2021-01-31 14:04

    Was facing the same issue.Turned out I was doing a rookie mistake. Try this instead:

    set MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
    
    0 讨论(0)
  • I tried set, didn't work for me, in the end:

     $env:
    

    worked. But you have to put your string in quotes like:

    $env:SPOTIFY_CLIENT_ID="XXXX"
    
    0 讨论(0)
  • 2021-01-31 14:16

    'export' command is valid only for unix shells. In Windows - use 'set' instead of 'export'

    0 讨论(0)
  • 2021-01-31 14:22

    SET does work as mentioned above.

    In case anyone wants to know how to use the data stored in variable use %variable%. if you want to print value in command prompt use echo %variable%

    ex: SET myVar = testsite.co.uk

    To print in command prompt:

    echo %myVar%

    To use in code, just use %myVar%

    0 讨论(0)
  • 2021-01-31 14:22

    I am using this way:

    $MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"

    0 讨论(0)
提交回复
热议问题