Enviado em 10/10/2021 - 16:30h
É o seguinte, estou tentando fazer um projeto javaFX que toca uma música do meu pc e sorteia números aleatórios com a mensagem "Hacking NASA" + numeroAleatorio.package com.example.demo1;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import java.io.File;
import java.util.Random;
import java.util.concurrent.TimeUnit;
public class HeckerVibes {
public static void main(String[] args) throws InterruptedException {
Random r = new Random();
int y = r.nextInt(25);
audio();
System.out.println("Hacking NASA... " + y + "%");
y = r.nextInt(50);
while(y < 25){
y = r.nextInt(50);
}
System.out.println("Hacking NASA... " + y + "%");
int h = r.nextInt(5) + 1;
TimeUnit.SECONDS.sleep(h);
y = r.nextInt(75);
while(y < 50){
y = r.nextInt(75);
}
System.out.println("Hacking NASA... " + y + "%");
h = r.nextInt(5) + 1;
TimeUnit.SECONDS.sleep(h);
y = r.nextInt(100);
while(y < 75){
y = r.nextInt(100);
}
System.out.println("Hacking NASA... " + y + "%");
h = r.nextInt(5) + 1;
TimeUnit.SECONDS.sleep(h);
System.out.println("Hacking NASA... 99%");
TimeUnit.SECONDS.sleep(1);
System.out.println("NASA hacked");
}
public static void audio(){
String kimo = "~/Music/musica.mp3";
Media hit = new Media(new File(kimo).toURI().toString());
MediaPlayer media = new MediaPlayer(hit);
media.play();
}
}
'javafx.media'na seção modules, isso não parece ser o erro.
Título: Descobrindo o IP externo da VPN no Linux
Armazenando a senha de sua carteira Bitcoin de forma segura no Linux
Enviar mensagem ao usuário trabalhando com as opções do php.ini
Encontre seus arquivos facilmente com o Drill
Mouse Logitech MX Ergo Advanced Wireless Trackball no Linux
Compartilhamento de Rede com samba em modo Público/Anônimo de forma simples, rápido e fácil
Cups: Mapear/listar todas as impressoras de outro Servidor CUPS de forma rápida e fácil
Letra "F" minuscula não está Funcionando no Linux Mint (18)
GNU GRUB, Não sair dessa tela, linux (6)
atualizar o linux com o comando apt update (2)