Eclipse red cross errors

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Eclipse red cross errors

Post by RogerSmith »

L2J Revision Number:5463
L2JDP Revision Number:8954

Just checked out these from SVN.
I constantly get errors in forms of red crosses in the package viewer.

Latest eclipse with Java JRE and JDK 7.0.5 (or something like this)

http://imageshack.us/photo/my-images/17 ... lipse.png/

The fault is on my end?
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

Had to select jre7 in preferances manually.

Errors disappeared but it won't let me build - says I have java 1.6, just reinstalled JDK7u5 still same.

halp./
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Eclipse red cross errors

Post by jurchiks »

you should select the default JDK in the JREs settings aswell. It is possible that you have both JDK6 and 7 and Eclipse has the first one set as default.
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.
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

Checked jre7 in the preferances.
Then in the execution environments checked jre7 for JavaSE 1.7.

Still doesn't do it.

Where do I choose the JDK?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Eclipse red cross errors

Post by jurchiks »

you sure you've installed JDK, not JRE?
Preferences->Java->Installed JREs->Add...->Standart VM->next->Directory... -> C:\Program Files\Java\jdk1.7.0_05\jre or whatever your path is. It should then list some libraries in the JRE Definition window. Click Finish and check the checkbox of the jdk in the list. That should be it.
You might need to restart Eclipse to be able to check it as the default in Execution Environments.
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.
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

I downloaded the JDK pack off the oracle.

Says includes both the JRE and JDK


What the compiler keeps insisting is to compile with java 1.6.

I restarted a bunch of times and checked all the checkbox that have any involvement with java 1.7.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Eclipse red cross errors

Post by jurchiks »

Java->compiler->compliance level=1.7
I've also noticed that sometimes the l2j project, when freshly downloaded, has compliance level set to some empty value and eclipse sets it to 1.4 or smth. to fix that, just open project properties and change the compliance level to 1.7
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.
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

Did it both ways, still won't say I have java 1.7

THis is what it looks like for me

http://imageshack.us/photo/my-images/35 ... ndjdk.png/

http://imageshack.us/photo/my-images/19 ... nment.png/
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Eclipse red cross errors

Post by MELERIX »

lol, seems you have mixed Java 6 and 7 versions at same time.

uninstall any Java version from your computer, and then follow this guides step by step: viewtopic.php?f=2&t=10719
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

Deleted all Java

Installed just JDK7u5 and whatever came with it.

Updated JAVA_HOME (didn't do last time)

Launch eclipse, check preferances for JRE - everything in place.

Still tried to compile with Java 1.6 - says the jre6 (which I had previously) could not be found (cos duh I uninstalled it)
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

Found a fix

http://exploreriddles.blogspot.co.uk/20 ... stall.html

Used option 2.

Compiled.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Eclipse red cross errors

Post by jurchiks »

Still tried to compile with Java 1.6
l2j uses Java 1.7...
Have you set the compiler to java 7 in both workspace and project preferences?
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.
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

jurchiks wrote:
Still tried to compile with Java 1.6
l2j uses Java 1.7...
Have you set the compiler to java 7 in both workspace and project preferences?
I don't know what was done or not. I had Java 1.6 and that's what it kept trying to compile with. Even after I uninstalled everything it wouldn't try it with 1.7.

I did this:
Go to RUN->External Tools ->External Tools Configurations…
Select your build.xml(in my case it is abc build.xml). Move to JRE tab.
Select the appropriate JRE.
This solved it.

The ant build would now compile with 1.7.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Eclipse red cross errors

Post by jurchiks »

that's not the right way to solve it...
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.
RogerSmith
Posts: 69
Joined: Fri Oct 01, 2010 11:57 am

Re: Eclipse red cross errors

Post by RogerSmith »

The right way didn't work :P
Locked