1

I am trying to make Sublime work with Java. I know there is a lot of tutorials but all of them for Windows. I was going through this one but it is for processing and it doesn't work wit imports. http://blog.boreal-kiss.net/2012/10/27/processing-with-sublime-text-2/

I am just starting with Java and using ACMStarterProject with acm.jar. http://www.stanford.edu/class/archive/cs/cs106a/cs106a.1124/assignments.html

What I want:

  • use sublime to build and run
  • use imports and package libraries
  • use java 7

I think I need to write a skript and make some changes to JavaC.sublime-build?

Thanks

Here is what I get in console:

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]
artpen
  • 25
  • 7
  • Eclipse or something even more decent, Intellij, isn't an option? I mean, I like and use sublime text, but I use it as a text editor and just edit files, not use it to build and whatnot – Andrei Sfat Apr 25 '14 at 10:00
  • Yep I was using Eclipse it is good BUT sublime is so nice. – artpen Apr 25 '14 at 10:03
  • @user3147156 sublime text might be fancy , even i had worked with it . but it always good to use `IDE's` as @Andrei suggests – Santhosh Apr 25 '14 at 10:05

0 Answers0