Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "jdk8"
-
JAVA_HOME = jdk1.8
Android Studio JDK location = jdk1.8
studio.bat JDK=jdk1.8
Run Android Device Manger - sorry you need jdk1.8 and you have jdk1.7
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafuuuuckyouuuuuaaaaaaaa🤬🤬🤬🤬🤬🤬🤬🤬🤬3 -
Today I learned:
In Java, you're supposed to compile a source file in its package one directory up, outside of its package. You can't compile the source file in its own package directory, for it will state "cannot find symbol" on files in the same package, even though they're in the correct package directory. That can be quite confusing at first.
Given the following directory structure:
|_
|_ \pkg
|_ _ Src1.java
|_ _ Src2.java (interface with static method)
and the following source:
package pkg;
public interface Src2 { static void doStuff() { ... }; } // assuming JDK8+, where static default methods are allowed
package pkg;
public class Src1 { public static void main(String[] args) { Src2.doStuff(); } }
..being inside the pkg/ directory in the console,
this won't work:
javac -cp . Src1.java
"cannot find symbol: Src2"
However, go one directory up and..
javac -cp pkg/*.java pkg/Src1.java
..it works!
Yeah, you truly start learning how the compiler works when you don't use the luxury of a IDE but rather a raw text editor and a console.1 -
Question, !rant
To all my fellow Java devs, what are some things that have come out in JDK8 and JDK9 that you think are the most useful?
I know very little about the new features, but after learning about lambdas I wondered what other golden nuggets there might be. Thanks in advance!1 -
Has anyone else lost all compatibility with Netbeans 10 and javafx on linux? I can't for the life of me get any packages to work together to fix the problem. Even installing "Netbeans8" and jdk8 and openjfx8 doesn't fix the problem.2