Moving from Java 8 to Java 11

Moving from Java 8 to Java 11

Postby Jastiv » 19 Jul 2019, 07:36

I want to fix my game editor so it works with Java 11, it is broke in Java 11 although in compiles and runs with java 8 because of variables, but I don't know where to begin to fix it.
I have all this stuff I need to fix, and no idea where to start.
I already know about SDKman and Intelij IDE.
So, any help would be appreciated (tutorials, where to start on a project like that, how to replace variables.
Else I fear I will be spending years and looking at irrelevant stuff and by that time it will be Java 15!
User avatar
Jastiv
 
Posts: 285
Joined: 14 Mar 2011, 02:18
Location: Unitied States of America - East Coast

Re: Moving from Java 8 to Java 11

Postby fluffrabbit » 19 Jul 2019, 08:22

AFAIK Java 11 is 64-bit while Java 8 is 32-bit, though I could be way off. Anyhow that could definitely affect the size of things, for instance ints.
fluffrabbit
 
Posts: 557
Joined: 11 Apr 2019, 11:17

Re: Moving from Java 8 to Java 11

Postby dulsi » 19 Jul 2019, 15:17

Does it not compile under Java 11? Do you have the error messages or are no looking for specific help and just want generally information on updating code?
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Moving from Java 8 to Java 11

Postby Jastiv » 19 Jul 2019, 18:14

ant
Buildfile: /home/lori/Wogralddev/wograldgit/wograld-gitcode/javaeditor/trunk/build.xml

compile-utils:
[mkdir] Created dir: /home/lori/Wogralddev/wograldgit/wograld-gitcode/javaeditor/trunk/dest/utils/app
[javac] Compiling 35 source files to /home/lori/Wogralddev/wograldgit/wograld-gitcode/javaeditor/trunk/dest/utils/app
[javac] warning: [options] bootstrap class path not set in conjunction with -source 6
[javac] error: Source option 6 is no longer supported. Use 7 or later.
[javac] error: Target option 6 is no longer supported. Use 7 or later.

BUILD FAILED
/home/lori/Wogralddev/wograldgit/wograld-gitcode/javaeditor/trunk/build.xml:604: Compile failed; see the compiler error output for details.

Total time: 0 seconds

Its is a lot. I have no idea how to move from basic things like hello world, to updating a language to work with a whole new compiler. I don't even know where to look for compiler error output.
User avatar
Jastiv
 
Posts: 285
Joined: 14 Mar 2011, 02:18
Location: Unitied States of America - East Coast

Re: Moving from Java 8 to Java 11

Postby fluffrabbit » 19 Jul 2019, 20:13

It looks like the build flags are wrong. Either build.xml or build.properties (I think that's what it's called) is specifying a Java 6 target while Java 11 may not target versions that far back. Assuming Java is backwards-compatible, just increase the number from 6 to whichever version of Java you think should be the minimum.

Java has fallen out of favor and it's also notoriously hard to learn. But there's no better way to learn than by doing.
fluffrabbit
 
Posts: 557
Joined: 11 Apr 2019, 11:17

Re: Moving from Java 8 to Java 11

Postby dulsi » 20 Jul 2019, 14:12

In build.xml, I think you just need to change build.source.version.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Moving from Java 8 to Java 11

Postby Ntech » 24 Jul 2019, 19:02

I hate it when languages change (why do they feel the need), for example, I regret the push to Python 3 from Python 2.7.

Anyway, this may be helpful: https://codete.com/blog/java-8-java-11-quick-guide/
Deo gratias, Ave Maria
User avatar
Ntech
 
Posts: 94
Joined: 30 May 2019, 20:40

Who is online

Users browsing this forum: No registered users and 1 guest