Skip to content

Commit

Permalink
Updated path for IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
ashik5757 committed Oct 7, 2021
1 parent 8b3fed7 commit 760bb62
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions LaunchApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ public void start(Stage primaryStage) throws IOException, InterruptedException {
loadingPageControl.setStage(primaryStage);


//Image icon = new Image("file:/F:/IntelliJ/Java/ScoreBoard Project/Final Logo.png");
Image icon = new Image(getClass().getResourceAsStream("/Final Logo.png"));
Image icon = new Image("file:Final Logo.png"); // For IDE
//Image icon = new Image(getClass().getResourceAsStream("/Final Logo.png")); // For JAR
createFile();


primaryStage.getIcons().add(icon);
primaryStage.setTitle("Cricket Live Scoreboard");

Expand Down Expand Up @@ -115,8 +116,6 @@ public void createFile() throws IOException {
//File databaseFile = new File("/ScoreBoard/data/AllTeamName.txt");




}


Expand All @@ -134,10 +133,12 @@ public void createFile() throws IOException {

public ArrayList<String> getTeamList() throws IOException {


ArrayList<String> list = new ArrayList<String>();

//InputStream in = new FileInputStream("AllTeamName.txt");
InputStream in = getClass().getResourceAsStream("/AllTeamName.txt");

InputStream in = new FileInputStream("AllTeamName.txt"); // For IDE
//InputStream in = getClass().getResourceAsStream("/AllTeamName.txt"); // For JAR
BufferedReader reader = new BufferedReader(new InputStreamReader(in));


Expand All @@ -159,8 +160,8 @@ public ArrayList<String> getPlayerList() throws IOException {

ArrayList<String> list = new ArrayList<String>();

//InputStream in = new FileInputStream("AllPlayerName.txt");
InputStream in = getClass().getResourceAsStream("/AllPlayerName.txt");
InputStream in = new FileInputStream("AllPlayerName.txt"); // For IDE
//InputStream in = getClass().getResourceAsStream("/AllPlayerName.txt"); // For JAR
BufferedReader reader = new BufferedReader(new InputStreamReader(in));


Expand Down

0 comments on commit 760bb62

Please sign in to comment.