## Cannot Find File Specified

### Cannot Find File Specified

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
Code: Select all
`public class Test{   public static void main(String[] args)   {      System.out.println("hello world");   }}`

When I got to build all I get is
[Error 2] The system cannot find the file specified
[Finished]

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

Any ideas?
seandidk

Posts: 3
Joined: Tue Feb 01, 2011 11:14 pm

### Re: Cannot Find File Specified

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.
jps

Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

### Re: Cannot Find File Specified

This is the output from the console.
Code: Select all
`startup, version: 20110130 windows x32paths inited. packages: /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packages settings: /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Settingserror parsing session: No data at: 0:0package /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 PackageSetupPackageSetup returned: -1scanning /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packagesscanned /C/Users/UNAME/AppData/Roaming/Sublime Text 2/Packagescatalogue loadedfound 1 files for base name Default.sublime-themefound 2 files for base name Default (Windows).sublime-keymapfound 1 files for base name Main.sublime-menuReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\comment.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\exec.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\find_under_expand.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\font.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\sort.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\transform.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.pyReloading plugin C:\Users\UNAME\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.pyloading bindingstheme loadedapp readyUnknown external include source.applescript included from source.shellUnknown external include source.applescript included from source.shellUnable to open /C/Users/UNAME/Desktop/Test.javaloaded 920 snippetsUnable to auto detect encoding, using fallback encoding Western (Windows 1252)Writing file /C/Users/UNAME/Desktop/Test.java with encoding UTF-8Running javac C:\Users\UNAME\Desktop\Test.java`
seandidk

Posts: 3
Joined: Tue Feb 01, 2011 11:14 pm

### Re: Cannot Find File Specified

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
Code: Select all
` 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?
seandidk

Posts: 3
Joined: Tue Feb 01, 2011 11:14 pm

### Re: Cannot Find File Specified

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

Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

### Re: Cannot Find File Specified

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 :
Code: Select all
`{   "cmd": ["javac", "\$file"],   "file_regex": "^(...*?):([0-9]*):?([0-9]*)",   "selector": "source.java",   "windows": {      "cmd": ["javac.exe", "\$file"]   }}`
rody

Posts: 1
Joined: Wed Sep 14, 2011 10:32 am