PDA

View Full Version : In Eclipse got 1 error, 99 Warnings


thedawn2000
April 27th, 2006, 09:20 AM
The Error I got was:
Syntax error on token ".", = expected

What do I do about this?

thedawn2000
April 27th, 2006, 09:30 AM
the error was in:
UDPConnectionProcessor.java

thedawn2000
April 27th, 2006, 09:32 AM
This was also in the error.... I'm a newbie... please forgive me:

Syntax error on token ".", = expected
UDPConnectionProcessor.java
Limewire/core/com/limegroup/gnutella/udpconnect
line 674

icefreak
May 1st, 2006, 10:41 AM
The Exact Same Happened To Me

icefreak
May 1st, 2006, 10:42 AM
Wot Do I Do??

numard
May 2nd, 2006, 07:09 AM
Not sure if this is right, error is gone and it does make sense (to me ;) )

[betom@ayiin] [Tue May 2 17:08:53 2006]
~/limewire/trunk/core/com/limegroup/gnutella/udpconnect
$ svn diff
Index: UDPConnectionProcessor.java
================================================== =================
--- UDPConnectionProcessor.java (revision 20728)
+++ UDPConnectionProcessor.java (working copy)
@@ -14,6 +14,8 @@
import com.limegroup.gnutella.ErrorService;
import com.limegroup.gnutella.UDPService;
import com.limegroup.gnutella.settings.DownloadSettings;
+// BETO
+import com.limegroup.gnutella.Assert;

/**
* Manage a reliable udp connection for the transfer of data.
@@ -670,8 +672,9 @@
* Convenience method for sending data.
*/
private synchronized void sendData(ByteBuffer chunk) {
- try {
- assert chunk.position() == 0;
+ try {
+ //assert chunk.position() == 0;
+ Assert.that(chunk.position()==0);
DataMessage dm = new DataMessage(_theirConnectionID,_sequenceNumber, chunk);
send(dm);
DataRecord drec = _sendWindow.addData(dm);

numard
May 3rd, 2006, 02:59 AM
update your code to rev 20730 (which should be current at the point of posting this msg).

then simply comment out the assert line in UDPConnector....java ( put // in front of it). That basically removes the line from the compilation, which means the code will not check that the pointer in the chunk of data being passed is @ the beginning.... but , hey! it is beta software! :D

good luck,
Beto

Sam
May 3rd, 2006, 03:20 AM
Looks like Eclipse is set up to compile without support for Java 1.4. The wiki should be updated to reflect changing Eclipse to have 1.4 support. We're eventually going to be using a lot more 1.4 & 1.5 constructs, so this is a good test-run.

Zootella
May 3rd, 2006, 08:17 PM
n00b or not: I actually last week helped a fellow LimeWire developer here with exactly this same issue. Sam is right - you have to change Eclipse to use Java 1.4. Here are the steps:

http://www.limewire.org/wiki/index.php?title=Program.Guide.ConfigureEclipse
In the section titled "Use Java 1.4"