Questions tagged [java-10]

Use this tag for questions specific to Java 10, which is version 10 of the Java platform, released on 20 March 2018. In most cases you should also specify the java tag.

Oracle announced the general availability of Java SE 10 (JDK 10) on March 20, 2018.

JDK 10 is a production-ready implementation of the Java SE 10 Platform Specification, as specified by JSR 383 in the Java Community Process.

Key features include:

  • Local-variable type inference: enhances the Java language to extend type inference to declarations of local variables with initializers.
  • Parallel Full GC for G1: improves G1 worst-case latencies by making the full GC parallel.
  • Application Class-Data Sharing: optimizes startup time and footprint by extending the existing Class-Data Sharing ("CDS") feature to allow application classes to be placed in the shared archive.
  • Experimental Java-Based JIT Compiler: enables the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform

Other document links - Release Notes and API JavaDoc

397 questions
0
votes
2 answers

Maven not running with Java 10: Files\Java\jdk-10""=="" was unexpected at this time

I'm trying to upgrade my application to Java 10, so, I installed the JDK and set JAVA_HOME: C:\Users\pupeno\app>echo %JAVA_HOME% "c:\Program Files\Java\jdk-10" C:\Users\pupeno\app>%JAVA_HOME%\bin\javac.exe --version javac 10 but no matter what I…
pupeno
  • 256,034
  • 114
  • 324
  • 541
0
votes
1 answer

Convert explicit type to var in IDEA

I have a Java 10 project with the following code: Map map = method(); When I put the cursor on Map... and press Alt+Enter, there should be an option "Replace explicit type with var". However, this option is missing from my menu. How…
ZhekaKozlov
  • 29,055
  • 16
  • 100
  • 138
0
votes
2 answers

sudo R CMD javareconf and R CMD javareconf produce different output with java 10

I on macOS 10.13.3 and I just update to java 10 and when I've tried to update R to it I just realize that I get two different outputs if I run R CMD javareconf with or without sudo. If I run with sudo it sticks to Java 9, but if I run without sudo…
lpuerto
  • 191
  • 2
  • 13
0
votes
1 answer

Apache Ant version for java 10

Is Ant 1.10.2 compatible with Java 10? The ant documentation is not very clear: it just says that it is compatible with a minimum version of Java 1.5. How can I be sure that it is compatible with java 10? Thank you!
DAIRAV
  • 701
  • 1
  • 6
  • 29
0
votes
0 answers

Unable to run old code with java 9 (10)

I have an executable jar, it was compiled with java 6 and in this project datanucleus is used as ORM (an old version, 1.1.6). The jar runs fine with java 6, 7, 8 but not with 9 (10): running it I get a lot or errors like this one on various…
res1
  • 2,882
  • 4
  • 25
  • 40
-1
votes
1 answer

Read excel file in java without using any jars

I have a requirement to read excel file in java without using any third party library jar like POI,JEXCEL .I don't know exactly can spring support for same? Please suggest if you know something. Thanks in advance Using POI I have done but read…
Rajendra
  • 69
  • 1
  • 9
-1
votes
1 answer

Unable to Correctly Import Dependencies

I am currently trying to make a web-scraping program with jsoup. However, everything I have imported does not seem to show up when I compile my program, and it errors out saying it can't find any objects that I reference from jsoup. This is how I…
Sammy
  • 51
  • 1
  • 10
-1
votes
6 answers

Is there an effective way in java9 or java 10 to check if a date is between two dates

whether a given date lies between other two dates (where dates are manually created using dd-MM-yyyy format) Date startDate, endDate, dateToCheck; if (dateToCheck.equals(startDate) || dateToCheck.equals(endDate) || …
yasin
  • 47
  • 1
  • 8
-1
votes
1 answer

What versions of Java do Anypoint Studio and the Mule Runtime support?

I am trying to migrate from Java 8 to Java 10 and determine which versions of Java Anypoint Studio and the Mule Runtimes support. Is it possible to set them up to run with Java 10?
-1
votes
1 answer

HttpRequest.BodyPublisher cannot find symbol

Error:(226, 34) java: cannot find symbol symbol: variable BodyPublisher location: class jdk.incubator.http.HttpRequest private static JSONObject sendRequest(JSONObject json) throws Exception { HttpClient client; InetSocketAddress…
Celsius
  • 59
  • 1
  • 8
-2
votes
2 answers

Initialization of Main() in java and seeking alternative code

I am given a following partial Java code: public static void main(String[] args) { var main = new Main(); main.start(); } I don't understand the initializing in Line 2 (Main()). Also, what is the datatype of Main()? Suppose, I don't want to use…
Ricky
  • 81
  • 8
-2
votes
1 answer

Java parallel stream to fill array

I have an hashmap that is very big and it's full of prime numbers. var mapA = new HashMap(); I need to do heavy calculations on it and so I am using parallel streams: var res = new ArrayList
Raffaele Rossi
  • 2,737
  • 2
  • 20
  • 49
-2
votes
2 answers

Type inference: Generics, "var"

I thought the Java compiler (Java 11) could infer by itself the actual generic type, if I gave it enough hints, for example when the generic type is a method parameter and I provide as a parameter an instance of the actual type. For example, I have…
rapt
  • 10,528
  • 29
  • 92
  • 134
-2
votes
1 answer

Can't run or import JARs with Java 10 and Java 11

I am unable to run .jar archives using Java 10 or Java 11 (they exit with NoClassDefFoundError). Likewise, I am also unable to import .jar archives into a Java Project; they appear in the Classpath, but Eclipse says that the import cannot be…
Lazy Wolf
  • 97
  • 2
  • 9
-2
votes
1 answer

Did Java 10 eliminate for each loops?

I recently installed Java 10 and upgraded my Maven project to Java 10 then. I have a block of code where I'm trying to loop over a list of objects(in this case TableModelListeners from Swing's JTable system). This code is reported as an error…
1 2 3
26
27