Forte/Windows directory confusion.
Every time I try to load an external data file using Forte for the execution (keyboard shortcut: F6), my relative path to that data file gets messed up.
For Example:
I have a directory (C:\dev\classes) where my classes reside.
I use the following code in my class:
File fTest = new File("data.txt");
System.out.println(fTest.getAbsolutePath());
If I run java from the command line in the C:\dev\classes directory the output is :C:\dev\classes\data.txt
But if I run it from within Forte the output is: C:\Apps\forte4j\bin\data.txt
How do I fix this?
Is it possible to fix?
# 1
Sure, after Forte starts after invoking runide.exe the current directory is forte4j\bin. You can either use an absolute path or invoke runide.exe from the directory where you need to write the file to. For example write C:\Apps\forte4j\bin\runide.exe in the command prompt.
Standa
> Nathan Christiansen wrote:
> Every time I try to load an external data file using Forte for the execution (keyboard shortcut: F6), my relative path to that data file gets messed up.
>
> For Example:
>
> I have a directory (C:\dev\classes) where my classes reside.
>
> I use the following code in my class:
>
> File fTest = new File("data.txt");
> System.out.println(fTest.getAbsolutePath());
>
> If I run java from the command line in the C:\dev\classes directory
> the output is :C:\dev\classes\data.txt
>
> But if I run it from within Forte the output is:
> C:\Apps\forte4j\bin\data.txt
>
> How do I fix this?
>
> Is it possible to fix?
>