0
我无法让WEBMethods写入我的公司网络驱动器。但是,我可以通过C#中的简单调用访问网络驱动器,但无法使用Java。网络驱动器和本地驱动器Q:驱动器共享到相同的位置。所以我应该可以通过驱动器名称和服务器或通过Q:驱动器访问驱动器。WEBMethods(Java)不写入网络驱动器?
我改变了驱动器名称,以至于看不到可能会告诉别人驱动器名称的信息。
问题:为什么我可以通过C#(写入和读取)而不是Java来访问我的Q:驱动器?
代码:(JAVA)
writer = new PrintWriter(new BufferedWriter(new FileWriter("\\\\A\\B\\S\\A B\\P\\T\TWM\\" + matcher.group(1) + ".txt")));
C#代码:
class Program
{
static void Main(string[] args)
{
//Read the file as one string.
string text1 = System.IO.File.ReadAllText(@"Q:\\S\ABCPS\T\TWM\T.txt");
//string text1 = System.IO.File.ReadAllText(@"\\E5\D\SYS\Tes\T.txt");
//string text1 = System.IO.File.ReadAllText(@"\\DS\ES\S\ABKS\T\TM\T.txt");
System.Console.WriteLine("Contents of WriteText.txt = {0}", text1);
string myLine = "Test line of code!!!!";
System.IO.File.WriteAllText(@"Q:SY\ACS\T\U\N.txt", myLine);
Console.WriteLine("Press any key to exit.");
System.Console.ReadKey();
}
}