Home Download Buy Blog Forum Support

Cannot Find File Specified

Cannot Find File Specified

Postby seandidk on Tue Feb 01, 2011 11:17 pm

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

Postby jps on Wed Feb 02, 2011 12:45 am

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
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Cannot Find File Specified

Postby seandidk on Wed Feb 02, 2011 2:26 am

This is the output from the console.
Code: Select all
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
seandidk
 
Posts: 3
Joined: Tue Feb 01, 2011 11:14 pm

Re: Cannot Find File Specified

Postby seandidk on Wed Feb 02, 2011 2:31 am

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

Postby adzenith on Wed Feb 02, 2011 2:55 am

I think putting a space after the semicolon in your PATH variable might be a problem, but I'm not sure...
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Cannot Find File Specified

Postby rody on Wed Sep 14, 2011 10:42 am

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


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 14 guests