Have you tried hardcoding the path in your new File () statement?
File file = new File ("C:\\myWorkspace\
Or, make it a little more portable:
String dir = ... // Possibly get the value from a .properties file?
File file = new File (dir + "\\new.txt")
-Java Guy
pedrogabrielvecchi wrote:
>
>
> Hello:
>
> I use WID 6.1.2 Build id: 6.1.2ifix004-
> When I do
>
> File file = new File("new.txt"
> String absolutePathOfFirst
> System.out.println(
>
> or
>
> IWorkspace workspace = ResourcesPlugin.
> String folder=
> workspace.getRoot(
> System.out.println(
>
> The result is "C:\WID612\pf\
>
> How I get the name of the workspace folder with code java, for example
> "C:\myWorkspace\
>
> What I really need is to open the file new.properties in the folder
> "C:\myWorkspace\
>
> Properties propiedades = new Properties()
>
> String locationFile = ??????
>
> FileInputStream propertiesFile = new FileInputStream(
> properties.load(
> String user = properties.getPrope
>
> Any idea?
>
> Thanks
>
>
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
No comments:
Post a Comment