current directory [message #123050] |
Fri, 05 September 2003 10:12 |
Eclipse User |
|
|
|
Originally posted by: npatel.indigostone.com
Dear all,
I am running simple ant script under eclipse 2.1.
======================================
<target name="test">
<java classname="RM.test" classpath=".">
</java>
</target>
======================================
This file runs test.java file.
======================================
package RM;
import java.io.File;
public class test
{
private static String ThisIsTestString1 = "TEST";
private static String ThisIsTestString2 = "TEST";
public static void main(String[] args)
{
test t = new test();
String s = System.getProperty("user.dir");File file = new File("RM",
"TEST_VERS.java");
System.out.println("VERS = " + file.getAbsolutePath());
}
}
======================================
My ant file path is : c:\tmp
My Eclipse ran from c:\eclipse (entry of start in on shortcut)
Expected output : VERS = c:\tmp\RM\TEST_VERS.java
Real output: VERS = c:\eclipse\RM\TEST_VERS.java
Question is, is there any way to change "c:\eclipse" reference with
"c:\tmp".
Please note that if we change start-in value to "c:\tmp" in shortcut,
eclipse does not allow to mount project.
In simple terms, I would like to change the current directory of eclipse,
not ECLIPSE_HOME, which java uses to create File objects relative to the
project path.
I hope this makes sense.
I am thinking going back to netbeans after trying all options, if I can not
resolve this soon enough.
Thanks in advance
Nilesh Patel.
|
|
|
Powered by
FUDForum. Page generated in 0.03423 seconds