I have a bash file which should repeatedly run this java program for data collection while I sleep.
Here is bash file:
#!/bin/bash
javac Main.java
START=`date +%s`
while [ $(( $(date +%s) - 28800 )) -lt $START ]; do
java Main
done
When I execute the bash file: ./cache_script.sh
from the same directory as my Main.java file, these errors occurs:
Main.java:16: error: cannot find symbol
Entry[] entries = new Entry[DATA_SET_SIZE];
^
symbol: class Entry
location: class Main
Main.java:16: error: cannot find symbol
Entry[] entries = new Entry[DATA_SET_SIZE];
^
symbol: class Entry
location: class Main
Main.java:20: error: cannot find symbol
entries[i] = new Entry(999999999, 999999999, 99999999.9);
^
symbol: class Entry
location: class Main
Main.java:25: error: cannot find symbol
LruCache<Integer, Entry> lruCache = new LruCache<>(CAPACITY);
^
symbol: class LruCache
location: class Main
Main.java:25: error: cannot find symbol
LruCache<Integer, Entry> lruCache = new LruCache<>(CAPACITY);
^
symbol: class Entry
location: class Main
Main.java:25: error: cannot find symbol
LruCache<Integer, Entry> lruCache = new LruCache<>(CAPACITY);
^
symbol: class LruCache
location: class Main
6 errors
It looks like the bash interpreter isn't finding the Entry.java and LruCache.java files that my Main.java uses.
How can I fix this?