• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

! Java 13 has been released

 
Sheriff
Posts: 21805
104
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yesterday, Java 13 has been released. You can download it in a number of varieties:
* Oracle's (non-open) JDK: https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK13
* OpenJDK: http://jdk.java.net/13/

(AdoptOpenJDK doesn't have a Hotspot build yet)


For changes in the API, check https://robtimus.github.io/whats-new-in-java/. There's nothing that stands out though; 3 new methods were added to String but these are deprecated because they are more or less experimental.
 
Bartender
Posts: 2371
102
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see some new methods in DOM and SAX to create namespace aware instances. Those new String deprecated methods seem to be directed towards programmers. But I wonder why would they add new deprecated methods in a new release. Perhaps these methods are used in the java source somewhere. Nothing stands out to me too.

Thanks for sharing Rob.
 
Rancher
Posts: 3371
31
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

salvin francis wrote:Those new String deprecated methods seem to be directed towards programmers. But I wonder why would they add new deprecated methods in a new release. Perhaps these methods are used in the java source somewhere.



I see three new String methods which are also deprecated: formatted(), stripIndent(), and translateEscapes().  All three have the following comment in javadoc:

Deprecated, for removal: This API element is subject to removal in a future version.
This method is associated with text blocks, a preview language feature. Text blocks and/or this method may be changed or removed in a future release.

 
Ranch Hand
Posts: 37
4
Netbeans IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am hoping that they leave the text block format in future builds if nothing else. In situations where it's appropriate to have larger chunks of multi-line text, it makes for much more readable code.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I expect they will leave it in - they're just warning us that things might change.  The most likely scenario is that in Java 14 they will simply remove the @Deprecated tags, possibly also with minor API revision.
 
Marshal
Posts: 65814
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those methods's deprecated status probably means that they still haven't finalised the format for raw Strings.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They haven't finalized the feature in general - whether it's the format, or the implementation, or the documentation, or something else.  It's a preview feature that must be enabled with the --enable-preview flag.  This is their way of including not-yet-fully-final-and-official code in a release, so people can have access to it, but with the caveat that some details may change.
 
Campbell Ritchie
Marshal
Posts: 65814
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't get it to work in Java12, not even with the --enable flag. I did get the new form of switch to work in Java12 with --enable however.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I couldn't get it to work in Java12, not even with the --enable flag. I did get the new form of switch to work in Java12 with --enable however.


By "it", do you mean the new text blocks?  That was never a Java 12 feature; it's only a preview feature in Java 13.  Whereas the new switch was a preview feature in Java 12 and (in altered form) in Java 13.

Java 12 features
Java 13 features
 
Saloon Keeper
Posts: 21133
134
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forward deprecation. What a concept.

Maybe they need an @Experimental or @Unstable annotation.
 
Greenhorn
Posts: 13
Android Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys! Anyone tried Java 13 yet? How is it? Which one is better - 12 or 13? Whatcha think??
 
Campbell Ritchie
Marshal
Posts: 65814
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Simmons wrote:. . . By "it", do you mean the new text blocks? . . .

Yes. Thank you for the two links.
 
Tim Holloway
Saloon Keeper
Posts: 21133
134
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Harold Kelly wrote:Hey guys! Anyone tried Java 13 yet? How is it? Which one is better - 12 or 13? Whatcha think??



Well, I don't know about language merits, but I just pulled down a Gradle-based open-source project and gradle/groovy broke big time under Java 13. Had to revert to Java 11. So I wouldn't rush things.

That may say more about Gradle and Groovy than Java 13, but I'm used to being able to pull Maven projects and expect them to build.
 
Campbell Ritchie
Marshal
Posts: 65814
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Simmons wrote:. . . the new text blocks? . . .

I found this JEP link which tells us all about code blocks. They are different from the version planned for Java12.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is making less sense to me as we go.  "Code blocks" are something else, which has been in the language since the beginning.  I assume you meant text blacks, as your link indicates.  And the fact remains that, as far as I know, text blocks were never part of Java 12, which is no longer planned but out; it's old news.  Perhaps text blocks were once planned for 12 but pushed to 13?  I'm not sure what you're saying here.
 
Bartender
Posts: 3518
150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,

I m getting a bit worried. I am still on Java 10. Sofar I have not seen any novelties that I thought were worth upgrading, but I am getting 3 versions behind now. Any advice? NB: I like to keep JavaFX as part of the JDK, so that's why I've been reluctant sofar.
 
Sheriff
Posts: 6268
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe version 11 is a long-term maintenance release, so that's what I'm on -- but I am only a hobbyist at this point.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, nowadays every 3rd release is supposed to be a long-term support release, starting with Java 8, then Java 11, and presumably Java 14 when it comes out.  Java 10 is out of its official support period, which would concern me if any critical vulnerability is exposed, for example.  For any paid work I'd at least get to Java 11 (or even back to 8).  After that, I wouldn't worry too much until 14 comes out.  But, it's fun to see what's coming, checking out the other releases.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:Forward deprecation. What a concept.

Maybe they need an @Experimental or @Unstable annotation.



Agreed, that would be much clearer.  Guava's @Beta annotation works well...
 
Rob Spoor
Sheriff
Posts: 21805
104
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Simmons wrote:Yeah, nowadays every 3rd release is supposed to be a long-term support release, starting with Java 8, then Java 11, and presumably Java 14 when it comes out.


LTS releases come every 3 years, not every 3 releases. The next one is going to be 17, in 2 years time.

I still mostly work on Java 8 for my library work, to keep a broader audience (and even a few Java 7 file system implementations). At work we've started on our first Java 11 projects, with no plans to use anything newer until Java 17.

@Piet: I'd upgrade to Java 11, but no further for anything that should be production ready. For hobby projects you can try Java 12 or 13, although Java 13 probably doesn't work with most tools yet.
 
Mike Simmons
Rancher
Posts: 3371
31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the correction, Rob.  I knew there was a 3 in there somewhere.
 
straws are for suckers. tiny ads are for attractive people.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!