mbien commented on code in PR #6329:
URL: https://github.com/apache/netbeans/pull/6329#discussion_r1416481776
##########
java/java.file.launcher/src/org/netbeans/modules/java/file/launcher/SingleSourceFileUtil.java:
##########
@@ -68,15 +73,15 @@ static FileObject
getJavaFileWithoutProjectFromLookup(Lookup lookup) {
return null;
}
- static boolean isSingleSourceFile(FileObject fObj) {
+ public static boolean isSingleSourceFile(FileObject fObj) {
Project p = FileOwnerQuery.getOwner(fObj);
if (p != null || !fObj.getExt().equalsIgnoreCase("java")) { //NOI18N
return false;
}
return true;
}
- static Process compileJavaSource(FileObject fileObject) {
+ public static Process compileJavaSource(FileObject fileObject) {
FileObject javac =
JavaPlatformManager.getDefault().getDefaultPlatform().findTool("javac");
//NOI18N
Review Comment:
> I think I (and possibly others) are considering separating the runtime JDK
and the JavaPlatform used by projects in VS Code extension. Maybe by changing
the result of JavaPlatformManager.getDefaultPlatform().
yes but since java files are not associated with a project, users can't even
influence on which JDK they want to run the single/multi-file-java-program
(SMFJP?). Which is independent of the default JDK vs nb runtime discussion.
Controlling this over the default JDK is one way of doing this, but what if
users don't want to run a file on the default JDK but on a specific JDK?
A JDK selector could be potentially added to the file properties, just like
we have in maven/ant/gradle projects.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists