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.
Passkeys: A Evolução da Autenticação Digital
Instalação de distro Linux em computadores, netbooks, etc, em rede com o Clonezilla
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
Instalação Microsoft Edge no Linux Mint 22
Como configurar posicionamento e movimento de janelas no Lubuntu (Openbox) com atalhos de teclado
Máquinas Virtuais com IP estático acessando Internet no Virtualbox
Quais arquivos vc salvaria num backup se vc soubesse que seu hd/ssd ia... (8)
Falha no Gnome Display Manager (2)