简体   繁体   中英

How do i tell the Dart Editor to use the PATH location of the SDK?

I would like to store my dart-sdk outside of the folder where i keep the editor. For sake of brevity lets say its stored in C:/dart-sdk/bin

C:\Users\John> echo %PATH%
..;..;C:\dart-sdk\bin

C:\Users\John> dart--version   
Dart VM version: 1.8.5

C:\Users\John> echo %DART_SDK%
C:\dart-sdk

However, when i open the dart editor, it cannot find the SDK.

Results in "Missing Dart SDK" in the description.

If i moved the SDK back into the dart folder, it works as expected, but seems brittle.

How do i point Dart/Eclipse to the execution path of dart-sdk? Is there a linked resources variable i need to define?

Inside the containing folder create a file called editor.properties (The Dart Editor Bundle already includes this)

ensure the following pair exists:

dart.sdk=/path/to/dart-sdk

Note: Windows environments do not need the drive letter prefix, dart will figure it out - so C:\\dart-sdk would by dart.sdk=/dart-sdk

The above path variables for DART_SDK seem relevant to some 3rd party utilities - but AFAIK not the Dart Editor itself. I would love clarification or a list of pertinent configuration variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM