
Enviado em 15/04/2021 - 22:36h
O meu código em java por algum motivo para no if ou no else do ifString home = System.getenv("HOME");
JOptionPane.showMessageDialog(null, "Programa rodando");
try {
FileReader arq = new FileReader(home + "/Documentos/.economy-game/log-exists.txt");
BufferedReader lerArq = new BufferedReader(arq);
String linha = lerArq.readLine();
JOptionPane.showMessageDialog(null, linha);
if (linha.equals("true")) {
JOptionPane.showMessageDialog(null, "Economy-game has started!");
}
else {
Scanner scan = new Scanner(System.in);
String nick;
System.out.println("Enter your nickname:");
nick = scan.nextLine();
System.out.println("Your new nick is " + nick);
Path dir = Paths.get(home + "/Documentos/.economy-game/my-nick.txt");
byte[] nickbyte = nick.getBytes();
try {
Files.write(dir, nickbyte);
} catch(Exception erro) {
System.out.printf("Erro: %s");
}
String LogBln = "true";
Path LogExistsDir = Paths.get(home + "/Documentos/.economy-game/log-exists.txt");
byte[] LogBlnByte = LogBln.getBytes();
try {
Files.write(LogExistsDir, LogBlnByte);
} catch(Exception erro) {
System.out.println("Erro: %s");
}
scan.close();
}
JOptionPane.showMessageDialog(null,"fora do if");
arq.close();
} catch (IOException e) {
System.err.printf("Erro na identificação do log: %s.\n",
e.getMessage());
} Cirurgia para acelerar o openSUSE em HD externo via USB
Void Server como Domain Control
Modo Simples de Baixar e Usar o bash-completion
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
Atualizar Linux Mint 22.2 para 22.3 beta
Jogar games da Battle.net no Linux com Faugus Launcher
Como fazer a Instalação de aplicativos para acesso remoto ao Linux
Conky, alerta de temperatura alta (10)
Assisti Avatar 3: Fogo e Cinzas (3)
Duas Pasta Pessoal Aparecendo no Ubuntu 24.04.3 LTS (42)









