Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » current directory
current directory [message #123050] Fri, 05 September 2003 10:12
Eclipse UserFriend
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.
Previous Topic:Table with ScrollBars and SetSize.
Next Topic:listener attempted to access system.err - infinite loop terminated
Goto Forum:
  


Current Time: Fri Jun 06 22:53:17 EDT 2025

Powered by FUDForum. Page generated in 0.03423 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top