I have seen many JavaScript applications of this being done on the internet and would like to create on designed on Java.

As I am new to this, I have no clue on what to do. I have a fair idea and so far I have this:

package dice_game;
import javax.swing.*;


public class Main {


public class Objects {
// declare the global variables
int wip0, wip1, wip2, wip3, wip4;
int dice0, dice1, dice2, dice3, dice4;
int pass0, pass1, pass2, pass3, pass4;


int diceroll, total;


}


public static void main(String[] args) {


int dice0 = (int)(Math.random()*6) + 1;
System.out.println("Your first score: " + dice0);



}


}

Any clues guys?

You cannot create a javascript application in java, because javascript is not java, it is javascript.
You create javascript applications written in javascript.
And the javasx.swing package is for desktop applications. It has nothing to do with the internet.

I suggest to forget what you want to do for a few years.
From the code you wrote you don't even know good java.

Clear your thoughts. Decide what you want to do specifically and read some books on that. From what I read, you don't even know what you want to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.