Salisbury University Java
A VSCode extension for COSC117 students at Salisbury University. Built to help beginners who are not tech-savvy get started with Java quickly.
Features
Auto File Template
When creating a new .java file, the extension automatically:
- Derives the package name from the folder structure under
src/
- Inserts a default class with a
main method using the filename
Example: Creating src/animals/Dog.java produces:
package animals;
public class Dog {
public static void main(String[] args) {
}
}
Project Scaffolding
Create a new Java project with standard structure in the current directory:
- Press
Cmd+Shift+P and search for "Create Java Project"
- Enter a project name
- The project is created with:
project-name/
src/
bin/
No new window opens - you stay in your current workspace.
One-Click Run
Click the Run button in the editor title bar to run your code. The extension:
- Compiles all
.java files in the project's src/ folder
- Automatically finds the class with
main method
- Creates
bin/ within the project for compiled files
Multi-File Support
All Java files in the project are compiled together, so you can have multiple classes that reference each other (e.g., Main.java using Person.java, Calculator.java, etc.).
Error Simplification
Translates complex Java compiler errors into beginner-friendly messages shown in the Problems panel.
Installation
- Open the extension folder in VSCode
- Run
npm install
- Press
F5 to launch the extension in the debugger
For Distribution
npm run compile
vsce package
This creates a .vsix file that can be installed via Extensions: Install from VSIX in VSCode.
Commands
| Command |
Title |
Description |
java-focused.runFile |
Run Java File |
Compile all files in src/ and run the main class |
java-focused.runAllFiles |
Run All Open Java Files |
Compile and run all currently open Java files |
java-focused.setupProject |
Setup Java Project Structure |
Add src/ and bin/ folders to current project |
java-focused.createProject |
Create Java Project |
Create a new Java project in current directory |
Configuration
| Setting |
Default |
Description |
javaFocused.srcFolder |
src |
Folder name used as root for deriving package names |
Project Structure
When running code, the extension expects:
your-project/
src/
Main.java
Helper.java
Person.java
bin/ (created automatically on run)