Lockfile is created on opening a visual class using visual editor [message #136070] |
Fri, 23 February 2007 11:56 |
Eclipse User |
|
|
|
Originally posted by: Igor.Jasan.lbv.nrw.de
Hi,
the following lines of code are in my visual class:
...
public static String lockfilename = "drucken-lock";
...
public void WriteLockFile() {
try {
FileWriter out = new FileWriter(lockfilename);
int cnt = 0;
out.write(cnt + ": " + "\n");
out.close();
}
catch (IOException e) {
System.out.println("Fehler: Datei " + e.toString());
}
}
If I open my class in eclipse using the visual editor a file
"drucken-lock" is written into the project folder. This file is empty (0
bytes) and locked by the system. Only after closing the editor pane is it
possible to delete the file.
If I open the same class in the eclipse java editor nothing happens.
Is there any solution to this? I can't execute my application inside
eclipse if this lock file exists beforehand.
Thank you
Igor
|
|
|
Re: Lockfile is created on opening a visual class using visual editor [message #136088 is a reply to message #136070] |
Fri, 23 February 2007 13:43 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Yes there is. Surround code like this:
if (!Beans.isDesigntime()) {
> try {
> FileWriter out = new FileWriter(lockfilename);
> int cnt = 0;
> out.write(cnt + ": " + "\n");
> out.close();
> }
> catch (IOException e) {
> System.out.println("Fehler: Datei " + e.toString());
> }
}
Igor wrote:
> Hi,
>
> the following lines of code are in my visual class:
>
> ...
> public static String lockfilename = "drucken-lock";
> ...
>
> public void WriteLockFile() {
> }
>
> If I open my class in eclipse using the visual editor a file
> "drucken-lock" is written into the project folder. This file is empty (0
> bytes) and locked by the system. Only after closing the editor pane is
> it possible to delete the file.
> If I open the same class in the eclipse java editor nothing happens.
>
> Is there any solution to this? I can't execute my application inside
> eclipse if this lock file exists beforehand.
>
> Thank you
> Igor
>
--
Thanks,
Rich Kulp
|
|
|
Re: Lockfile is created on opening a visual class using visual editor [message #615087 is a reply to message #136070] |
Fri, 23 February 2007 13:43 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Yes there is. Surround code like this:
if (!Beans.isDesigntime()) {
> try {
> FileWriter out = new FileWriter(lockfilename);
> int cnt = 0;
> out.write(cnt + ": " + "\n");
> out.close();
> }
> catch (IOException e) {
> System.out.println("Fehler: Datei " + e.toString());
> }
}
Igor wrote:
> Hi,
>
> the following lines of code are in my visual class:
>
> ...
> public static String lockfilename = "drucken-lock";
> ...
>
> public void WriteLockFile() {
> }
>
> If I open my class in eclipse using the visual editor a file
> "drucken-lock" is written into the project folder. This file is empty (0
> bytes) and locked by the system. Only after closing the editor pane is
> it possible to delete the file.
> If I open the same class in the eclipse java editor nothing happens.
>
> Is there any solution to this? I can't execute my application inside
> eclipse if this lock file exists beforehand.
>
> Thank you
> Igor
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03059 seconds