----- Original Message -----
Sent: Friday, November 08, 2002 1:51
PM
Subject: [cejug-discussao] pergunta de
iniciante - trabalhando com handler de arquivo
antes queria que o mais esperientes me desculpassem pelas perguntas basicas
que tenho feito, mas devido a urgente e os baixos recursos que disponho, estou
tendo que estudar sozinho. Alem do curso que estou fazendo na Fic, não cobrir
Java, pois no proximo perido será ensinado C.
Abaixo segue o codigo de meus testes(obrigado as dicas de todos, que tem me
ajudado a melhorar os codigos):
8 import java.io.*;
9 import java.lang.*;
30 try
{
31 File
file = new
File(fullNameFile);
32
// Create file if it does not
exist
33
boolean success =
file.createNewFile();
34
if (success)
{
35
// File did not exist and was
created
36
System.out.println("Arquivo Criado, agora pode ser
usado");
37
System.out.println(fullNameFile);
38
} else
{
39
// File already
exists
40
System.out.println("Arquivo já existe e já pode ser
criado");
41
}
42 } catch (IOException e)
{
43
System.out.println("Problemas com o
arquivo");
44
System.out.println(e.toString());
45
}
46
47
48 try
{
49
RandomAccessFile raf = new RandomAccessFile(file,
"rw");
50
51 //
Read a
character
52
char ch = raf.readChar();
...............................
este codigo estava executando bem até o momento que inseri estas linhas,
passei a receber a seguinte mensagem:
PowerFirewall/PowerControll.java [49:1] cannot resolve
symbol
symbol : variable file
location: class
PowerFirewall.PowerControll
RandomAccessFile raf = new RandomAccessFile(file,
"rw");
^
PowerFirewall/PowerControll.java [55:1] cannot resolve
symbol
symbol : variable file
location: class
PowerFirewall.PowerControll
raf.seek(file.length());
^
2 errors
Errors compiling PowerControll.
Obrigado
--<vbr>##############################<vbr>#
Carlos Delfino Carvalho Pinheiro<vbr># Especialista em Redes e
Linux<vbr># LFS Nº 6635<vbr>##############################
Yahoo! GeoCitiesTudo
para criar o seu site: ferramentas fáceis de usar, espaço de sobra e
acessórios.
---
Outgoing mail is certified Virus Free.
Checked by AVG
anti-virus system (
http://www.grisoft.com).
Version: 6.0.413
/ Virus Database: 232 - Release Date: 6/11/2002