The EEE lab machines have the Java Runtime Environment (JRE) installed on the "Shared Drive". To allow the use of Visual Studio Code for programming in Java we need configure Visual Studio Code to use the JRE on the "Shared Drive" and install some plugins.
Below are some steps to run a Windows script to automatically configure the correct JRE path and install the necessary plugins for you.
Important
These steps are only for working on the QUB EEE lab and vLab machines
Warning
These steps will have to be repeated every time you log onto a new QUB EEE lab or vLab machine
- Open "Google Chrome" by double clicking on the Desktop icon:
- Go to /~https://github.com/dlim04/fundamentals-of-programming-for-engineers-labs/ and click
dlim-configure-vscode-java.bat
:
- Click the "Download raw file" button:
- Wait for the file to download and then open the file:
- Click
More info
:
- Click the "Run anyway" button:
- A terminal window should appear. Wait for the script to output "Complete!" and then press any key to close the teminal window:
You have now successfully configured Visual Studio Code for Java development.
- Open "Visual Studio Code":
- A "Getting Started with VS Code" tab may appear. Scroll down and click
Mark Done
:
- Click the "Explorer" button:
- Click the "Create Java Project" button:
- Click
No build tools
- A window will appear asking you to select a location to create your Java project folder.
In my case I chose to create a
fundamentals-of-programming-for-engineers-labs
folder in myDocuments
folder. If you wish to save your lab work across machines you may wish to choose theI:
drive as the location to create your Java project folder. Click the "Select the project location" button:
- Type a name for your Java project and press the "Enter" key.
Here I have chosen the name
lab-1
:
- Click
src
(shorthand for source) in the "Explorer" sidebar:
- Open
App.java
by clicking it:
- Click the "Run" button:
- A terminal should appear with "Hello , World!" printed in it:
You have successfully run "Hello, World!" in Java.
- Print the following penguin:
4MMMMMMMMMMMML
4MMMMMMMMMMMMMMMML
MMMMMMMMMMMMMMMMMMML
4MMMMMMMMMMMMMMMMMMMMM
4MMMMMMMMMMMMMMMMMMMMMML
MMMMP MMMMMM MMMMMMM
MMMM MM MMM MM MMMMMM
MMMM MM MMM MM MMMMML
MMM MP,,,,,,,MM MMMMMM
MM," "MMMMMMP
MMw 'MMMMMM
MM"w w MMMMMMML
MM" w w " MMMoMMML
MMM " wwwwwww " MMMMMMML
MMMP ".,,,,,," MMMMMMMML
MMMP MMMMMMMML
MMMMM MMMMMMMML
MMMMM,,-'' ''-,,MMMMMMMMML
MMMMM MMMMMMMMML
MMMMM MMMMMMMMML
MMMMM MMMMMMMMMM
MMMM MMMMMMMMMM
MMMMM MMMMMMMMMML
MMMMM MMMMMMMMMMM
MMMMMM MMMMMMMMMMM
MMMMMMM MMMMMMMMMMM
""MMMM MMMMMMMMMMP
" ""MMM MMMMMMMMP
"" " "MMMMMM ""MMMMMP""
" "MMMMMMM "" "" "
" ""MMMMMM M" " ""
" " MMM" "
" "M MMMM" "
" "MM MMMMMMMMM" ""
" "MMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMM" ""
"" MMMMM " ""
"" " Larry Ewing & r^2