Standalone Java files support #2384
Replies: 2 comments
-
How are your files organized? 1 folder per student, same class/file name for everyone? (eg. student1/Ex1.java, student2/Ex1.java, ...) or 1 exercise folder, each student bring their own file (eg. exercise1/Student1.java, exercise1/Student2.java ...)? |
Beta Was this translation helpful? Give feedback.
-
As for "multiple Unnamed Packages" support, I'm not aware this is supported by the Eclipse Compiler for Java. |
Beta Was this translation helpful? Give feedback.
-
VSCode extension says it supports "Standalone Java files support"
I'm a teacher with a lot of simple .java files to grade. The students have not and will not be using packages as this is a rather simple class in one file.
Having one .java file runs fine. When a second one or more are added, VSCode compiles all the files in the folder. Needless to say, some student files may contain syntax errors. So I can't run or debug the one student file I'm grading. An ability to debug each file is important to give the best possible feedback on the student submission.
Is there a workaround for this situation? It seems to be an option under Java specification.
7.4.2. Unnamed Packages states:
An implementation of the Java SE Platform must support at least one unnamed package. An implementation may support more than one unnamed package, but is not required to do so. Which ordinary compilation units are in each unnamed package is determined by the host system.
Beta Was this translation helpful? Give feedback.
All reactions