今天我在我的macbook上安裝了intelliJ ceylon IDE。編譯我的項目時,我收到以下消息錫蘭運行:未找到模塊默認/未版本
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java "-Dceylon.system.repo=/Users/Laust/Library/ApplicationSupport/IdeaIC2016.3/CeylonIDEA/classes/embeddedDist/repo" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/Laust/Library/Application Support/IdeaIC2016.3/CeylonIDEA/classes/embeddedDist/lib/ceylon-bootstrap.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.redhat.ceylon.launcher.Bootstrap run --run main default/unversioned
ceylon run: Module default/unversioned not found in the following repositories:
/Users/Laust/Library/Application Support/IdeaIC2016.
3/CeylonIDEA/classes/embeddedDist/repo
/Users/Laust/.ceylon/cache
https://modules.ceylon-lang.org/repo/1
[Maven] Aether
[NPM] npm
Process finished with exit code 1
該代碼在我的另一臺計算機(Windows 7)上執行得很好。
文件夾 '模塊' 包含以下內容:
default
default.car
default.car.sha1
default.src
default.src.sha1
和我的構建配置looks as follows。
這是我的代碼(在文件源/ main.ceylon)
shared void main() {
print("Generating pretty sweet g-code:");
{Gcommand+} myGcommands = {
G00(Vector3(0.0, 0.0, 0.0)),
G00(Vector3(9.0, 0.0, 0.0)),
G00(Vector3(9.0, 9.0, 0.0)),
G00(Vector3(0.0, 9.0, 0.0)),
G00(Vector3(0.0, 0.0, 0.0))
};
GcodeProgram myGcodeProgram = GcodeProgram(*myGcommands);
print(myGcodeProgram.toString());
}
"A carthesian coordinate class"
alias X => Float;
alias Y => Float;
alias Z => Float;
class Vector3(shared X x, shared Y y, shared Z z) {
}
"An abstract spec class for all G-code command classes"
abstract class Gcommand() {
shared formal String toString();
}
"G-code command for moving in a straight line at rapid speed"
class G00(Vector3 endPoint) extends Gcommand() {
toString() => "G0 " + "X" + endPoint.x.string
+ "Y" + endPoint.y.string
+ "Z" + endPoint.z.string + "\n";
}
class GcodeProgram(Gcommand+ gcommands) {
variable String stringifiedGcodeProgram = "";
shared String toString() {
for (gcommand in gcommands) {
stringifiedGcodeProgram = stringifiedGcodeProgram + gcommand.toString();
}
return stringifiedGcodeProgram;
}
}
如果您選擇自動爲您創建新的,正確的運行配置,請務必事後刪除舊的,錯誤的運行配置(或者之前,以免混淆它們)。在'運行' - >'編輯配置'中這樣做。 – loldrup