Java 1.8 Compile warning

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Java 1.8 Compile warning

Post 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?
Last edited by cineva on Sun Jul 20, 2014 8:46 am, edited 1 time in total.
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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:)
Last edited by cineva on Sun Jul 20, 2014 8:46 am, edited 1 time in total.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Java 1.8 Compile warning

Post by UnAfraid »

Interlude branch is not made to support java 8.
Image
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Java 1.8 Compile warning

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Java 1.8 Compile warning

Post by UnAfraid »

Just use jdk 7 with eclipse either keper or luna it doesnt matters it supports all versions of java.
Image
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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.
Last edited by cineva on Wed Jul 16, 2014 12:47 pm, edited 1 time in total.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Java 1.8 Compile warning

Post 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
Image
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Java 1.8 Compile warning

Post by UnAfraid »

Interlude branch was updated to work with java 7 by Zoey76 here Changeset 5053
Image
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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.
Last edited by cineva on Sun Jul 20, 2014 8:47 am, edited 1 time in total.
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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?
Last edited by cineva on Sun Jul 20, 2014 8:47 am, edited 1 time in total.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Java 1.8 Compile warning

Post by Zoey76 »

Let me take a look.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
cineva
Posts: 22
Joined: Thu Sep 09, 2010 3:47 am

Re: Java 1.8 Compile warning

Post 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.
Last edited by cineva on Sun Jul 20, 2014 8:48 am, edited 1 time in total.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Java 1.8 Compile warning

Post 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.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
Post Reply