Now, what doesn't make sense to me, is why this DOES work:Ĭ:\Documents and Settings\Dave>javac -g c:\labjava\myfirstjavaprog. Why does it think that the last argument is a flag and not the file name? Javac: invalid flag: c:\labjava\Query.Java However, if I am in another directory, I get an error:Ĭ:\Documents and Settings\Dave>javac -g c:\labjava\Query.Java If I am in DOS and in the SAME directory as the source file, the compile works fine. I have searched all over the web and have found people complaining of this problem, but have never found an actual solution. It's not an ideal situation.I am having a problem compiling and running a program that uses the JDBC.
JGRASP JAVAC NOT FOUND INSTALL
On the other hand, if you're using Apache NetBeans with JDK 8, the choice is simpler, i.e., you need to install nb-javac, otherwise you will not be able to use Java in Apache NetBeans. So, as can be seen, from Apache NetBeans running on JDK 9 and onwards, you have a choice: either use the Java compiler from the JDK, which means you're not benefiting from a number of enhancements especially added for NetBeans over many years in the patched Java compiler, or you need to explicitly add the patched Java compiler, since it is provided by Oracle and its licensing is such that you need to take responsibility for installing it yourself. However, using model APIs added in JDK 9, Apache NetBeans can make use of the Java compiler directly from the JDK, as explained here: Yet, NetBeans gains a lot from the patched Java compiler, as explained below:Īlso see this reference for details on the situation: In short, neither Oracle nor Apache want the Java compiler to be part of NetBeans in Apache. Separate from Oracle's obvious understandable unwillingness to donate a Java compiler fork to Apache, or anyone else, Apache would have a problem with a fork of the Java compiler being distributed from Apache since the Java compiler is LGPL licensed. The Java compiler belongs to the JDK which is licensed to Oracle. That's because Oracle is not donating Java to Apache, instead, it is donating NetBeans. Let's start by looking at the question, what is "nb-javac"? Well, "nb-javac", which is a patched version of "javac", i.e., the Java compiler, has long been part of NetBeans, providing a highly tuned Java compiler specifically for the Java editor in NetBeans, and wasn't part of the donation of NetBeans to Apache since, of course, the Java compiler (or a fork thereof) cannot be part of the donation. If you miss out on seeing or responding to the message, go to Window | IDE Tools | Notifications anytime afterwards and you'll have another opportunity to install it: Note: The above appears in a balloon popup in the bottom right the first time you start up Apache NetBeans (incubating) 9.0 on JDK 9 or above. What does that mean? And why, when you start up Apache NetBeans (incubating) 9.0 on top of JDK 9 or above, do you see the following, instead:
JGRASP JAVAC NOT FOUND LICENSE
Not long after you start up Apache NetBeans (incubating) 9.0 on top of JDK 8, after accepting the license agreement and handling import settings, you're confronted with this dialog: