Austin GC
Austin GC

Reputation: 91

How to stop VSCode from adding 'package' to java files

Background

I installed all the VSCode 'Extension Pack for Java' when I started working with Java, this included:

Problem

The Extension "Language Support for Java(TM) by Red Hat" will attempt to add a package to each file you are working in automatically. However for the class I am in the grading tool asks you remove 'package' from the files before submitting. I can't seem to find a way to disable this and I am not as familiar with editing VSCode settings.

What I have tried

I tried just disabling the extensions but now I don't have access to the required .jars since disabling this extension also disables the ability to add .jars to your class path via IDE.

Upvotes: 1

Views: 1729

Answers (1)

Austin GC
Austin GC

Reputation: 91

This may not be the best solution but for some reason if I disable then enable "Language Support for Java(TM) by Red Hat" it stops prompting to add package...

Not sure if this is the recommended solution so curious if anyone else knows a better way.

Upvotes: 2

Related Questions