Page 1 of 2

Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 6:09 am
by cineva
same warning (error)
Eclipse Luna (lastet version 4.4 x64)
Subversion Slik (latest version 1.8.9 x64)
Java (latest JDK & JRE version 8u11 x64)
The Chaotic Throne: Interlude
Require Java 7
Core: https://svn.l2jserver.com/branches/L2_GameServer_it/
Datapack: https://svn.l2jdp.com/branches/L2J_DataPack_IT/
Datapack: http* works fine, https get error to 92%

with JDK 8u11 I get these warnings:

Code: Select all

[javac] Compiling 1214 source files to D:\Eclipse\Workspace\L2_GameServer_It\build\classes    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\FileLogFormatter.java:41: warning: '_' used as an identifier    [javac]     private static final String _ = "\t";    [javac]                                 ^    [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\FileLogFormatter.java:51: warning: '_' used as an identifier    [javac]         .append(_)    [javac]                 ^    [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\FileLogFormatter.java:53: warning: '_' used as an identifier    [javac]         .append(_)    [javac]                 ^    [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\FileLogFormatter.java:55: warning: '_' used as an identifier    [javac]         .append(_)    [javac]                 ^    [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\FileLogFormatter.java:57: warning: '_' used as an identifier    [javac]         .append(_)    [javac]                 ^    [javac]   (use of '_' as an identifier might not be supported in releases after Java SE 8)    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\L2Radar.java:72: warning: [overrides] Class L2Radar.RadarMarker overrides equals, but neither it nor any superclass overrides hashCode method    [javac]     public class RadarMarker    [javac]            ^    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\L2DropData.java:31: warning: [overrides] Class L2DropData overrides equals, but neither it nor any superclass overrides hashCode method    [javac] public class L2DropData    [javac]        ^    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\cache\FastMRUCache.java:45: warning: [overrides] Class FastMRUCache.CacheNode overrides equals, but neither it nor any superclass overrides hashCode method    [javac]     class CacheNode    [javac]     ^    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\pathfinding\Node.java:24: warning: [overrides] Class Node overrides equals, but neither it nor any superclass overrides hashCode method    [javac] public class Node    [javac]        ^    [javac] D:\Eclipse\Workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\taskmanager\TaskManager.java:68: warning: [overrides] Class TaskManager.ExecutedTask overrides equals, but neither it nor any superclass overrides hashCode method    [javac]     public class ExecutedTask implements Runnable    [javac]            ^    [javac] 11 warnings
with JDK 7u65 I get these warnings:

Code: Select all

[javac] warning: C:\Program Files\Java\jre8\lib\rt.jar(java/util/logging/Filter.class): major version 52 is newer than 51, the highest major version supported by this compiler.    [javac]   It is recommended that the compiler be upgraded.
I need a lower version than JDK 7u65?

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 10:19 am
by cineva
I'm back with new details.
I changed a few things but... new errors.

I use:
Eclipse Kepler 4.3 x64
Subclipse 1.8.x
Subversion 1.7.17 x64
Native JavaHL 1.7.9
JDK 7u65 x64
Core: https://svn.l2jserver.com/branches/L2_GameServer_it/
Datapack: https://svn.l2jdp.com/branches/L2J_DataPack_IT/
OS 8.1 x64 Enterprise

Problems/Warnings (14 items):

Code: Select all

Resource leak: 'statement' is not closed at this location   LoginController.java    /L2_GameServer_It/java/net/sf/l2j/loginserver   line 615    Java ProblemResource leak: 'lnr' is not closed at this location GeoPathFinding.java /L2_GameServer_It/java/net/sf/l2j/gameserver/pathfinding/geonodes   line 262    Java ProblemResource leak: 'jar' is never closed    AiManager.java  /L2_GameServer_It/java/net/sf/l2j/gameserver/ai2    line 76 Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GeoPathFinding.java /L2_GameServer_It/java/net/sf/l2j/gameserver/pathfinding/geonodes   line 275    Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GeoEngine.java  /L2_GameServer_It/java/net/sf/l2j/gameserver    line 615    Java ProblemResource leak: 'lnr' is never closed    GeoEngine.java  /L2_GameServer_It/java/net/sf/l2j/gameserver    line 568    Java ProblemResource leak: 'zipFile' is never closed    JarClassLoader.java /L2_GameServer_It/java/net/sf/l2j/gameserver/util   line 60 Java ProblemNull comparison always yields false: this expression cannot be null QuestTimer.java /L2_GameServer_It/java/net/sf/l2j/gameserver/model/quest    line 35 Java ProblemResource leak: 'inbr' is never closed   L2Event.java    /L2_GameServer_It/java/net/sf/l2j/gameserver/model/entity   line 148    Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GameServerTable.java    /L2_GameServer_It/java/net/sf/l2j/loginserver   line 115    Java ProblemNull comparison always yields false: this expression cannot be null AdminCursedWeapons.java /L2_GameServer_It/java/net/sf/l2j/gameserver/handler/admincommandhandlers   line 73 Java ProblemResource leak: 'statement' is not closed at this location   CursedWeapon.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/model  line 442    Java ProblemResource leak: 'inbr' is never closed   AdminEventEngine.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/handler/admincommandhandlers   line 110    Java ProblemResource leak: 'con' is not closed at this location NpcTable.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/datatables line 94 Java Problem
I'll appreciate your response.
I'm sorry for the new comment... I can't open new topic due the required comments allowed for this option, too much for me at this moment:)

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 11:14 am
by UnAfraid
Interlude branch is not made to support java 8.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:20 pm
by cineva
as you can see in my previous comment "JDK 7u65 x64" isnt java 8, right?
just tell me what's wrong with my packages installed and I'll fix it.

I mean:
Eclipse version is good or not?
Sublipse is good or not?
Subversion is good or not?
JDK 7u65 is good or not?
... for IT core & datapack.
I don't know what packages are compatibility for IT core & datapack.

Thank you for response.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:32 pm
by jurchiks
Warnings are not errors. You're using a very old branch with a relatively new version of Java, of course it will show warnings, but they don't break the code.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:39 pm
by UnAfraid
Just use jdk 7 with eclipse either keper or luna it doesnt matters it supports all versions of java.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:42 pm
by cineva
I use JDK 7u65 isnt java 7?
I get these errors/warnings with java 7 (JDK 7u65)
maybe I need change this java 7 version with old version of java (JDK 6u.x)?

Thank you again.


EDIT*

I changed from Eclipse Luna version (4.4) to Kepler (4.3) becouse Subclipse not support latest Eclipse version (Luna 4.4).

I wait your answer about java version for IT core & datapack.

Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:42 pm
by UnAfraid
cineva wrote:I use JDK 7u65 isnt java 7?
I get these errors/warnings with java 7 (JDK 7u65)
maybe I need change this java 7 version with old version of java (JDK 6u.x)?

Thank you again.
JDK 7 means Java 7

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 12:50 pm
by cineva
omg, I said 2 times that I use Java version JDK 7u65 where this is Java 7 update 65.
and I said with this version I get these errors/warnings.
I asked if I need to change this actualy version of Java 7 to old version, to Java 6 to fix my problem.
I hope that you'll understand me now.

Thank you.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 1:10 pm
by UnAfraid
Interlude branch was updated to work with java 7 by Zoey76 here Changeset 5053

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 2:45 pm
by cineva
was updated by Zoey76 to work with Java 7 update 65 or update 0?
because Zoey76 updated as you said last few years ago:

Code: Select all

Changeset 5053View differencesShow lines around each changeShow the changes in full contextIgnore:Blank linesCase changesWhite space changes Timestamp:    Nov 1, 2011 9:15:08 PM (3 years ago) Author:    Zoey76Message:     LEGACY: Interlude server update:
and Java 7 update 65 has been updated on April 15th 2014, that's why I'm really confused.
I tried with Java 7 update 65, update 60, update 55, update 51... same errors/warnings.
I'll back with more details later... I'll try with Java 7 update 0 or Java 6.x, who knows.

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 7:05 pm
by cineva
omg same results.
I'll tell you step by step maybe will help u guys to find my problem.

Download + Extract Eclipse Standard Luna 4.4 x64 (Desktop - OS Win 8.1 Enterprise x64)
Download + Install Java JDK 7u65 x64
Download + Install Subversion Sliksvn 1.8.9 x64
Edited eclipse.ini via Notepad++ and saved as he said on this: http://www.l2jserver.com/wiki/Setup_Ecl ... N#Download

Code: Select all

-startupplugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326-productorg.eclipse.epp.package.standard.product--launcher.defaultActionopenFile--launcher.XXMaxPermSize256M-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256m--launcher.defaultActionopenFile--launcher.appendVmargs   -vm C:\Program Files\Java\jdk1.7.0_65\jre\bin\server\jvm.dll   -vmargs   -Dosgi.requiredJavaVersion=1.7   -Xms512M   -Xmx512M   -Xss4M   -XX:PermSize=128M   -XX:MaxPermSize=256M   -XX:MaxGCPauseMillis=10   -XX:MaxHeapFreeRatio=70   -XX:+UnlockExperimentalVMOptions   -XX:UseG1GC   -XX:+UseFastAccessorMethods   -Dcom.sun.management.jmxremote   -Xverify:none
Open Eclipse + Help + Install New Software:
-> selected: Luna - http://download.eclipse.org/releases/luna
-> selected: Collaboration & marked : Subversive SVN JDT Ignore Extensions (Optional)
: Subversive SVN Team Provider
-> Next + Next + Accept + Finish + Accept Restart


Open Eclipse + Window + Show View + Other & Select SVN - SVN Repositories + Select Native JavaHL 1.8.8 (64bit...)
-> 3 packages selected as default: JavaHL 1.8.8 Win64 Binaries (Optional)
: Native JavaHL 1.8 Implementation (Optional)
: Subversive SVN Connetors
-> Next + Next + Accept + Finish (Warning: You are installing software that contains unsigned content. The authenticity or validity of this software cannot be established. Do you want to continue with the installation?)
-> Ok + Accept Restart


Open Eclipse + Window + Show View + Other & Select Ant - Ant
Open Window + Preferences & Select Java - Installed JREs & marked jdk1.7.0_65 + ok.

Add to SVN Repositories: New -> Repository Location: https://svn.l2jserver.com/branches/L2_GameServer_it/ + Finish + Check out.

Warnings (14 items):

Code: Select all

Description Resource    Path    Location    TypeNull comparison always yields false: this expression cannot be null AdminCursedWeapons.java /L2_GameServer_It/java/net/sf/l2j/gameserver/handler/admincommandhandlers   line 73 Java ProblemNull comparison always yields false: this expression cannot be null QuestTimer.java /L2_GameServer_It/java/net/sf/l2j/gameserver/model/quest    line 35 Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GameServerTable.java    /L2_GameServer_It/java/net/sf/l2j/loginserver   line 115    Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GeoEngine.java  /L2_GameServer_It/java/net/sf/l2j/gameserver    line 615    Java ProblemResource leak: '<unassigned Closeable value>' is never closed   GeoPathFinding.java /L2_GameServer_It/java/net/sf/l2j/gameserver/pathfinding/geonodes   line 275    Java ProblemResource leak: 'con' is not closed at this location NpcTable.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/datatables line 94 Java ProblemResource leak: 'inbr' is never closed   AdminEventEngine.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/handler/admincommandhandlers   line 110    Java ProblemResource leak: 'inbr' is never closed   L2Event.java    /L2_GameServer_It/java/net/sf/l2j/gameserver/model/entity   line 148    Java ProblemResource leak: 'jar' is never closed    AiManager.java  /L2_GameServer_It/java/net/sf/l2j/gameserver/ai2    line 76 Java ProblemResource leak: 'lnr' is never closed    GeoEngine.java  /L2_GameServer_It/java/net/sf/l2j/gameserver    line 568    Java ProblemResource leak: 'lnr' is not closed at this location GeoPathFinding.java /L2_GameServer_It/java/net/sf/l2j/gameserver/pathfinding/geonodes   line 262    Java ProblemResource leak: 'statement' is not closed at this location   CursedWeapon.java   /L2_GameServer_It/java/net/sf/l2j/gameserver/model  line 442    Java ProblemResource leak: 'statement' is not closed at this location   LoginController.java    /L2_GameServer_It/java/net/sf/l2j/loginserver   line 615    Java ProblemResource leak: 'zipFile' is never closed    JarClassLoader.java /L2_GameServer_It/java/net/sf/l2j/gameserver/util   line 60 Java Problem

what's wrong?

Re: Java 1.8 Compile warning

Posted: Wed Jul 16, 2014 8:28 pm
by Zoey76
Let me take a look.

Re: Java 1.8 Compile warning

Posted: Thu Jul 17, 2014 3:06 am
by cineva
Hello Zoey76,

The problem persist even with Eclipse Kepler version 4.3 or Luna version 4.4
The problem persist even with Standard or IDE for Java Developers & also with x86 or x64.
The problem persist even with JDK Java 6 update x or Java 7 update x
I tested with Java 6u24, 7u05, 7u51, 7u55, 7u60 & latest version for Java 7 (7u65).
I have installed only JDK that because contain JRE too, right? (300MB full installation)
I have tested with Sliksvn all versions from 1.6.x to latest version 1.8.9 one by one, x86 & x64.
Sliksvn -> Path var name have this value:

Code: Select all

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\SlikSvn\bin
I have installed also these softwares one by one how the requirements say in Installation Instructions:

Code: Select all

Subclipse 1.4.x includes and requires Subversion 1.5.x client features and working copy format.Subclipse 1.6.x includes and requires Subversion 1.6.x client features and working copy format.Subclipse 1.8.x includes and requires Subversion 1.7.x client features and working copy format.Subclipse 1.10.x includes and requires Subversion 1.8.x client features and working copy format. Links for 1.10.x Release:Changelog: http://subclipse.tigris.org/subclipse_1.10.x/changes.htmlEclipse update site URL: http://subclipse.tigris.org/update_1.10.xZipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240Archived releases: http://subclipse.tigris.org/archive Links for 1.8.x Release:Changelog: http://subclipse.tigris.org/subclipse_1.8.x/changes.htmlEclipse update site URL: http://subclipse.tigris.org/update_1.8.xZipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240Archived releases: http://subclipse.tigris.org/archive Links for 1.6.x Release:Changelog: http://subclipse.tigris.org/subclipse_1.6.x/changes.htmlEclipse update site URL: http://subclipse.tigris.org/update_1.6.xZipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240 Links for 1.4.x Release:Changelog: http://subclipse.tigris.org/subclipse_1.4.x/changes.htmlEclipse update site URL: http://subclipse.tigris.org/update_1.4.xZipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
with or without Subclise I get the same results, and these warnings appears after Check Out from SVN Repository.

Thank you for your assistance.

Re: Java 1.8 Compile warning

Posted: Thu Jul 17, 2014 4:37 am
by Zoey76
Interlude branch updated in Changeset 6599 to work in Java 8, please test it and let me know how it goes.

As far as I can tell server starts without errors, but I don't have the client here to test it in-game.