Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Not Found error
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357513
Message ID:
01357545
Views:
16
I don't have VS installed at home. I plan to buy computer later.

Try with minor modification @"'myFile'"

>Yes, I did, and I still get the error. Strange thing is that if I write the command to a batch file, the run the batch file from within my code, it works fine.
>
>Try this
>
>
>static void Main(string[] args)
>{
>    string sMSWord = @"C:\Program Files\Microsoft Office\Office10\winword.exe";
>    string sDocument = @"'C:\mydocs\some.doc'";
>    string sCommand = sMSWord + " " + sDocument;
>
>    System.Diagnostics.Process.Start(sCommand);
>
>}
>
>
>
>
>
>>>I was just playing around, and I tried this:
>>>
>>>
>>>string sCommand = @"C:\Program Files\Java\jdk1_6_10\bin\javac c:\myjava\Test.java";
>>>System.Diagnostics.Process.Start(sCommand);
>>>
>>>
>>>And I get "The system cannot find the specified file"
>>>
>>>If I leave off the "c:\myjava\Test.java", then the java compiler options are displayed, so that's not the part it can't find. I have verified that the .java file is there.
>>>
>>>I created a batch file with this in it:
>>>
>>>"C:\Program Files\Java\jdk1_6_10\bin\javac" "c:\myjava\Test.java"
>>>
>>>
>>>I ran it and it compiled the file fine.
>>>
>>>I'm guessing it has something to do with the space in the file paths.
>>>
>>>Anyone know what's wrong?
>>
>>Did you try to put the file name in single quotes?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform