Sublime Forum

Cannot Find File Specified

#1

Testing out the new Sublime Text 2, even though it is still a alpha, I’m having issues. I’m currently triyng out a simple Test.java. The code is below

public class Test { public static void main(String] args) { System.out.println("hello world"); } }
When I got to build all I get is

[quote][Error 2] The system cannot find the file specified
[Finished][/quote]

I think I have the javac path setup correctly because works fine compiling from command prompt.

Any ideas?

0 Likes

#2

If you open the console after running the build, you’ll be able to see the command it tried to run. Try pasting that into a command prompt, and see if it works there. If you’ve only just changed the path, you’ll need to restart Sublime Text for it to see the change.

0 Likes

#3

This is the output from the console.startup, version: 20110130 windows x32 paths inited. packages: /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packages settings: /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Settings error parsing session: No data at: 0:0 package /C/Program Files (x86)/Sublime Text 2/Pristine Packages/ActionScript.sublime-package is newer than the installed version (/C/Users/UNAME/AppData/Roaming/Sublime Text 2/Pristine Packages/ActionScript.sublime-package), running PackageSetup PackageSetup returned: -1 scanning /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packages scanned /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packages catalogue loaded found 1 files for base name Default.sublime-theme found 2 files for base name Default (Windows).sublime-keymap found 1 files for base name Main.sublime-menu Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\comment.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\exec.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\find_under_expand.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\font.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\sort.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\transform.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.py Reloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.py loading bindings theme loaded app ready Unknown external include source.applescript included from source.shell Unknown external include source.applescript included from source.shell Unable to open /C/Users/UNAME/Desktop/Test.java loaded 920 snippets Unable to auto detect encoding, using fallback encoding Western (Windows 1252) Writing file /C/Users/UNAME/Desktop/Test.java with encoding UTF-8 Running javac C:\Users\UNAME\Desktop\Test.java

0 Likes

#4

Okay it is the path. When I got to set the path in the windows path enviroment variables it does not seem to work. Im putting C:\Program Files (x86)\Java\jdk1.6.0_23; C:\Program Files (x86)\Java\jdk1.6.0_23\bin
Is there anything special needed since there are spaces and such?

0 Likes

#5

I think putting a space after the semicolon in your PATH variable might be a problem, but I’m not sure…

0 Likes

#6

Under windows, the command is not ‘javac’, but ‘javac.exe’. You can add a specific windows configuration as described in the manual here : http://sublimetext.info/docs/en/reference/build_systems.html

Here is my config :

{
	"cmd": "javac", "$file"],
	"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
	"selector": "source.java",

	"windows": {
		"cmd": "javac.exe", "$file"]
	}
}
0 Likes