Mac上的Sublime Text和java项目

时间:2014-04-25 09:52:17

标签: java macos

我正在努力让Sublime与Java一起工作。我知道有很多教程,但所有这些教程都适用于Windows。我正在经历这个,但是它是用于处理的,并且它不能用于进口。 http://blog.boreal-kiss.net/2012/10/27/processing-with-sublime-text-2/

我刚开始使用Java并将ACMStarterProject与acm.jar一起使用。 http://www.stanford.edu/class/archive/cs/cs106a/cs106a.1124/assignments.html

我想要的是什么:

  • 使用sublime构建并运行
  • 使用导入和包库
  • 使用java 7

我想我需要编写一个skript并对JavaC.sublime-build进行一些更改?

由于

以下是我在控制台中获得的内容:

Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java:8: error: package acm.program does not exist
import acm.program.*;
^
/Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java:11: error: cannot find symbol
public class CircleArea extends ConsoleProgram {
                                ^
  symbol: class ConsoleProgram
/Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java:16: error: cannot find symbol
println("This program calculates a circle area.");
^
  symbol:   method println(String)
  location: class CircleArea
/Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java:17: error: cannot find symbol
int r = readInt("Enter circle radius: ");
       ^
  symbol:   method readInt(String)
  location: class CircleArea
/Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java:20: error: cannot find symbol
println("Circle area is: " +area);
^
  symbol:   method println(String)
  location: class CircleArea
5 errors
[Finished in 2.2s with exit code 1]
[shell_cmd: javac "/Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject/CircleArea.java"]
[dir: /Users/romangorshkov/Documents/Eclipse/workspace/ACMStarterProject]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

1 个答案:

答案 0 :(得分:0)

在提出这个问题之前,您是否完成了搜索?无论如何,请check,如果它可以帮助你。