Moparscape - RSPS Community

RuneScape 2 Development => Server Help => Topic started by: DeathsChaos9 on May 28, 2010, 05:36:55 PM

Title: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: DeathsChaos9 on May 28, 2010, 05:36:55 PM
Credits to Project Evolution, (Anthony), and myself for contributing to the thread.

Table of Contents
Compiler


Common Java Exceptions   By (Anthony) (#post_exceptions)




Compiler Errors


100 Errors

This error happens to be a very common problem with beginners. This error is derived from a missing or having too many left or right brace brackets, { and }. 100 errors omit in private servers because that's the maximum the java compiler will output on default settings.

public class Example {
   public int errors() {
      return 0;
   }
   
   public void moreErrors() {
   
   
   public static void main(String[] args) {
      System.out.println("This is an example of 100 errors!");
   }
}
This wont throw the legendary 100 errors because the code is to small, but the concept is the same. There is a missing bracket and because of this we get a silly error. Obviously, we need to add another bracket.
Code: Java



Cannot Find Symbol

Another common pitfall for novices. This error means a certain variable or method cannot be found or hasnt been defined. Usually this is the case when the variable or method is located in a different class. Take a look,
Code: Java
  1. publicclass ClassOne {
  2.    privateint aVariable =2;
  3.    publicint getAVariable(){
  4.       return aVariable;
  5.    }
  6. }
Code: Java
  1. publicclass ClassTwo {
  2.    publicvoid printTheAVariable(){
  3.       int variable = getAVariable();
  4.       System.out.println(variable);
  5.    }
  6. }
They are both two different classes, and the objective is we want to print the aVariable located in the ClassOne class from the printTheAVariable() in the ClassTwo class. But we get an error, cannot find symbol. Whats the problem? Well, we didnt make a reference to the ClassOne class, so how do we expect the compiler to know what we are asking for? We simply instantiate the ClassOne class like so,
Code: Java
  1. ClassOne classOne =new ClassOne();
However we are not done. Now we need to reference our getAVariable() method. Here is what I mean,
Code: Java
  1.    publicvoid printTheAVariable(){
  2.       int variable = classOne.getAVariable();
  3.       System.out.println(variable);
  4.    }
This will call the getAVariable() method from the ClassOne class! If done correctly, it will print out the aVariable integer: 2.

What if we wanted to call the aVariable in ClassOne instead of the getAVariable()? "I referenced correctly but it gives me a 'variable has private access' error." Well, thats going to be discussed in the next section. Also, this also partly applies to static variables/methods, read here

Here is an exercise for you to work on,
Code: Java
  1. publicclass PlayerLevel {
  2.    publicint playerLevel =126;
  3. }
Code: Java
  1. publicclass PrintPlayerLevel {
  2.    publicvoid printPlayerLevel(){
  3.       int playerCbLevel = playerLevel;
  4.       sendMessage(playerCbLevel);
  5.    }
  6. }
Figure out how to fix it.


Variable has Private Access

This is an error which applies to all methods/fields(variables) with the private modifier. For example,
Code: Java
  1. privateint aVariable =2;
These are methods/fields which arent called outside of the class it is within (however reflection is a different story iirc). Read up on these for more information,
http://docs.oracle.com/javase/tutorial/java/javaOO/variables.html
http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html

Looking back at the other example, what happens when we try and call the aVariable from the ClassOne class like so,
Code: Java
  1. publicclass ClassOne {
  2.    privateint aVariable =2;
  3.    publicint getAVariable(){
  4.       return aVariable;
  5.    }
  6. }
Code: Java
  1. publicclass ClassTwo {
  2.    ClassOne classOne =new ClassOne();
  3.    publicvoid printTheAVariable(){
  4.       int variable = classOne.aVariable;
  5.       System.out.println(variable);
  6.    }
  7. }
We get: aVariable has private access in ClassOne. Why? Well, if you read the links I put up above, private modifiers mean methods/fields are only available within the class it is in. How can we fix this? Simply, you can take advantage of the Accessor pattern by making a 'getter' method like so,
Code: Java
  1.    publicint getAVariable(){
  2.       return aVariable;
  3.    }
Which was already used in the first place. Or you can make the aVariable field public. Here is the correct code,
Code: Java
  1. publicclass ClassOne {
  2.    publicint aVariable =2;
  3.    publicint getAVariable(){
  4.       return aVariable;
  5.    }
  6. }
Code: Java
  1. publicclass ClassTwo {
  2.    ClassOne classOne =new ClassOne();
  3.    publicvoid printTheAVariable(){
  4.       int variable = classOne.aVariable;
  5.       System.out.println(variable);
  6.    }
  7. }
This is self explanatory however here is a short excercise. Make a simple getter method for a variable named playerLevel. Look above if you dont understand.


; Expected

This is a pretty easy error. Like the error says, your missing a colon in the code. Colons are used to end expressions like so,
Code: Java
  1. publicboolean expression =true;
Colons are used a lot. "So why does my code give me a ; expected error?" Well, you obviously were missing a colon somewhere. Take a look at this example,
Code: Java
  1. publicvoid doSomething(){
  2.    System.out.println("Doing something...")
  3. }
Why was there a ; expected error? Look at the end of the println() method and figure it out, thats your exercise.


( or ) Expected

This error occurs when there are dominating (too many) left or right brackets, ( or ). Another obvious fix, a simple way to fix it is to find where there are too many left brackets against right brackets. Look at this example,
Code: Java
  1. if(aVariable1 == aVariable2 {
  2.    // do something here
  3. }
As you can see a right bracket was missing. Here is the correction,
Code: Java
  1. if(aVariable1 == aVariable2){
  2.    // do something here
  3. }
This also applies to methods like so,
Code: Java
  1. System.out.println(variable));
That would give a ; expected, however the problem lies with the fact there is one too many right brackets.

Your exercise for this section is trying to fix this if statement,
Code: Java
  1. if((totalLevel +1)-(totalLevel +(0+0)){
You dont have to focus on the variable or what this really does, the ovjective is to fix the brackets.


Code Too Large

This error is popping up more and more, and many people dont know why this happens. In a Jave method, its size cannot exceed 64KB. Why? Google it. What to do when this occurs? Well, you can split the one method into two parts. Say you have a method called parseIncomingPackets() (this is a RSPS reference) and it exceeded 64KB. A simple way to rid of this error would be to split it into two parts by creating a nother method such as parseIncomingPackets2(). Here is an example,
Code: Java
  1. publicvoid parseIncomingPackets(){
  2.    // 64KB, compiler gives an error
  3. }
Split up,
Code: Java
  1. publicvoid parseIncomingPackets(){
  2.    // below 64KB, no error
  3. }
  4.  
  5. publicvoid parseIncomingPackets2(){
  6.    // below 64KB, no error
  7. }
  8.  
Also, be noted you have to call the second method at one point probably like,
Code: Java
  1. publicvoid parseIncomingPackets(){
  2.    // your code here
  3.    parseIncomingPackets2();
  4. }


Duplicate Method

This error occurs when a programmer attempts to put two of the same methods in a class like so,
Code: Java
  1. class SomeClass {
  2.    publicvoid doSomething(){
  3.       // do something
  4.    }
  5.  
  6.    publicvoid doSomething(){
  7.       // do something
  8.    }
  9. }
This would give a: doSomething is already defined in SomeClass error. An easy fix is to just remove the appropriate method. Its usually just removing an older method. However, there can be a workaround. Methods with the same name but different parameters are a different story. Read on,
http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html

These are called overloading methods. Here is an example of overloaded methods,
Code: Java
  1. class SomeClass {
  2.    publicvoid doSomething(Object object){
  3.       // do something
  4.    }
  5.  
  6.    publicvoid doSomething(){
  7.       // do something
  8.    }
  9. }
As you can see, one of the doSomething() methods have a parameter which accepts an object. If you compile this class, you will not be given a duplicate method error. Your exercise is to create two different methods BOTH called getPlayer which one of them will accept a string called playerName and the other an integer called playerID.


Duplicate Case Label

This error occurs when a programmer is using a switch statement (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html) and attempts to compile when there are two of the same case labels. Here is an example of a duplicate case label,
Notice carefully and you will see two cases labelled with the number 2. This isnt allowed by the compiler so a fix would be like so,
Code: Java
  1. switch(expression){
  2.    case1:
  3.       // do something
  4.    break;
  5.    case2:
  6.       // do something
  7.    break;
  8.    case3:
  9.       // do something
  10.    break;
  11. }
You cant have multiple case labels. There is no exercise for this section.


Missing Return Type

A missing return type error indicates a method with no return type. A return type can be of an integer, boolean, char, string, etc. However this is not the case with constructors. Read up on constructors,
http://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html

Say we have a method like so,
Code: Java
  1. public doSomething(){
  2.    // do something here
  3. }
Why is it the compiler returns a missing return type error? Its due to the fact doSomething has no return type, unless the class was named doSomething it wouldnt invoke an error becasue its a constructor. To fix such an error just place the return type you wish after the public modifier (or before the method name). Here is the fix,
Code: Java
  1. publicvoid doSomething(){
  2.    // do something here
  3. }
Remember that void isnt the only thing that can be used! You can use int, char, string, etc.

Study this snippet,
Code: Java
  1. class DoSomething {
  2.    public DoSomething(){
  3.       // code goes here
  4.    }
  5. }
Does this give an error? Why or why doesnt it give an error?


Missing Return Statement

Missing return statements tie in with the section we went over above. Return types (other than void) must return a value.
Code: Java
  1. publicint getInt(){
  2.    System.out.println("Called getInt!");
  3. }
This simple method displays a message on the console. But there is a problem, a missing return statement error was thrown. Why? Like it says, we need the method to actually return something. All methods with a return type other than void requires a return statement. So to wrap this up, the fix would be,
Code: Java
  1. publicint getInt(){
  2.    System.out.println("Called getInt!");
  3.    return anInteger;
  4. }
anInteger represents a variable which is of an integer. This also doesnt make a difference to boolean or other return types. Your exercise is to make a method with a boolean return type which will return a boolean variable called aBoolean.


Variable Already Defined

A variable already defined error is similar to the duplicate method error. It means a variable is defined more than once. Take a look at this example which shows two local variables which would give the error,
Code: Java
  1. privatevoid doSomething(){
  2.         int number =1;
  3.         int number = aVariable;
  4.         System.out.println(number);
  5. }
As you should be able to notice, the number variable is defined twice in the same method. Which isnt allowed. Same thing goes for global variables.


Non-static Variable Cannot be Referenced from a static context

This error comes up when a programmer attempts to use a variable without a static keyword with a method that does. You can read more on static here,
http://docs.oracle.com/javase/tutorial/java/javaOO/initial.html

In the meantime, we have a class like so,
Code: Java
  1. class StaticExample {
  2.    publicint aVariable =0;
  3.    publicstaticint getAVariable(){
  4.       return aVariable;
  5.    }
  6. }
The problem lies with the aVariable. As you can see it has no static keyword. The fix would be to either make aVariable a static variable, or to make the getAVariable() method non-static. Very self-explanatory, a exercise shouldnt be needed.


Class ... is public, should be declared in...

This happens when a programmer tries to create a class that doesnt correspond to the name of the java file. Say for example we have a class named Client. Why would we get an error for having the following,
Code: Java
  1. publicclass SomethingElse {
  2. }
The reason behind this is because the class is called SomethingElse when it really should be called Client. See the relationship? Heres an exercise (and perhaps a tricky one for beginners). If I had a constructor that was named after the java file, but NOT named after the class declaration (which is SomethingElse), would it work?


Unreported Exception

An unreported exception error will be thrown if a snippet of code requires to be within a try/catch statement. Take a look at this example,
Code: Java
  1.     publicvoid readFileInput(){
  2.        FileInputStream fis =newFileInputStream("file.txt");
  3.     }
The problem with this code is it is necessary to have it closed in a try/catch block. To read more on those refer here,
http://docs.oracle.com/javase/tutorial/essential/exceptions/handling.html

In this case, a FileNotFoundException would be thrown if there happened to come an error. A fix would be to put all methods that require try/catch statements inside of one. Like so,
Code: Java
  1.     publicvoid readFileInput(){
  2.         try{
  3.             FileInputStream fis =newFileInputStream("file.txt");
  4.         }catch(FileNotFoundException ex){
  5.             // Handle error
  6.         }
  7.     }
You also must import the class that corresponds to the exception. In this case you would need to import the FileNotFoundException class.
Code: Java
  1. importjava.io.FileNotFoundException;


Illegal Start of Expression

An illegal start of expression can come up even when code looks perfectly fine, some common problems with this error are listed below. Defining a static field in a method isnt allowed, if you were to do this,
Code: Java
  1. publicvoid aMethod(){
  2.         staticint variable =5;
  3. }
Another would be with unbalanced brace or regular brackets. Take a look at this if statement,
Code: Java
  1. if(1+(11))==12)
You can see here there is an extra bracket that isnt supposed to be there. This section will be updated more.


... cannot be applied to ...

This error comes up when the programmer invokes a method with incorrect parameters (http://www.oracle.com/technetwork/java/index.html). Say for example we have this class,
  1.    publicvoid sendMessage(String message, boolean isStaff){
  2.       // code here
  3.    }
  4.  
  5.    publicvoid run(){
  6.       sendMessage("This is a message");
  7.       // other codes here
  8.    }
  9. }
This would give us an error that sendMessage(java.lang.String, boolean) in SomeClass cannot be applied to (java.lang.String). There is a simple explanation, due to the fact the sendMessage() method has two parameters; a string and a boolean, we only invoked the method with a string. To resolve this problem, we would also call sendMessage() with a string and boolean. This would be the fix,
Code: Java
  1. class SomeClass {
  2.    publicvoid sendMessage(String message, boolean isStaff){
  3.       // code here
  4.    }
  5.  
  6.    publicvoid run(){
  7.       sendMessage("This is a message", true);// can be true or false
  8.       // other codes here
  9.    }
  10. }
This also applies to whether its being called with a wrong type, too little or too many parameters. An exercise for you is, would having two different sendMessage() methods with different parameters fix the problem?


Else without if

An else without if error is pretty self explanatory, but I will go over it anyways. The result of such an error happens when using if statements or else/else if statements. Basically, a rule applies to else/else if statements - they need to have a beginning expression. What this means, is there needs to be an if statement before any else/else if statements. This is WRONG,
Code: Java
  1. else{
  2.    // shit here
  3. }
This is correct,
Code: Java
  1. if(expression){
  2.    // shit here
  3. }else{
  4.    // shit here
  5. }
This is WRONG,
Code: Java
  1. elseif(expression){
  2.    // shit here
  3. }else{
  4.    // shit here
  5. }
This is correct,
Code: Java
  1. if(expression){
  2.    // shit here
  3. }elseif(expression){
  4.    // shit here
  5. }else{
  6.    // shit here
  7. }
Hopefully you get the point.

Title: Common Compiler Errors & Java Exceptions
Post by: DeathsChaos9 on May 28, 2010, 05:40:41 PM

Reached end of file while parsing
This error is thrown when you are missing a bracket near the end of your class.
Code: Java
  1. publicclass Example {
  2.         publicstaticvoid main(String args[]){
  3.                 //Do Stuff
  4.         }
  5.  
As you can see in this case, the class was left unclosed. It should be written as
Code: Java
  1. publicclass Example {
  2.         publicstaticvoid main(String args[]){
  3.                 //Do Stuff
  4.         }
  5. }
Its a very simple fix, unlike finding your missing bracket in 100 errors, you can simply go to the end of your class and have look around :)


package ... does not exist
Thrown when importing a nonexistant package.

Code: Java
  1. importjava.io.inPutStream;
  2.  

The package you import has to exist. Naturally, its case sensitive.

Code: Java
  1. importjava.io.InputStream;
  2.  

If your importing from your own source files, the package is the folders leading up to the class.

Code: Java
  1. importcom.rs2.server.Server;// Imports Server class
For more info: http://docs.oracle.com/javase/tutorial/java/package/usepkgs.html


Orphaned Case
An orphaned case is a case that is lying outside of a switch statement
Code: Java
  1. switch(example){
  2.         case1:
  3.                 //Stuff
  4.         break;
  5.  
  6.         case2:
  7.                 //Stuff
  8.         break;
  9. }
  10.         case3:
  11.                 //Orphaned Case
  12.         break;
  13.  
As you can see, the case was declared after the statement was closed.
This is a common error and quite easy to fix, simply A.) Move the case inside a switch statement, or B.) Surround the case with a switch statement
Code: Java
  1. switch(example){
  2.         case1:
  3.                 //Stuff
  4.         break;
  5.  
  6.         case2:
  7.                 //Stuff
  8.         break;
  9.  
  10.         case3:
  11.                 //Stuff
  12.         break;
  13. }


'try' without 'catch' or 'finally'
You wrote try {, but forgot a catch or finally.
Code: Java
  1.         publicstaticvoid main(String[] args){
  2.                 try{
  3.                         new java.net.ServerSocket(43594, 1, null);//Wrong
  4.                 }
  5.         }
This would throw the error. Its pretty easy to fix, you just need to add catch with the appropriate exception (see Java Exceptions (https://forum.moparscape.org/index.php/topic,438121.0.html/))
Code: Java
  1.                 try{
  2.                         new java.net.ServerSocket(43594, 1, null);
  3.                 }catch(IOException e){
  4.                         e.printStackTrace();
  5.                 }
  6.         }

Alternatively, you can add a throw to the method.
Code: Java
  1.         publicstaticvoid main(String[] args)throwsIOException{
  2.                         new java.net.ServerSocket(43594, 1, null);
  3.         }


Unreachable Statement
I thought I added that error, guess not. Anyway, an unreachable statement is a statement that comes after a break or return.

Here's an example of an unreachable statement.
Code: Java
  1. class Example {
  2.     publicstaticvoid main(String args[]){
  3.         if(args[0].equals("example")){
  4.             System.out.println("This is an example");
  5.             return;
  6.             System.out.println("This is an unreachable statement");
  7.         }
  8.     }
  9. }

An acceptable alternative would be something like.

Code: Java
  1. class Example {
  2.     publicstaticvoid main(String args[]){
  3.         if(args[0].equals("example")){
  4.             System.out.println("This is an example");
  5.             return;
  6.         }
  7.         System.out.println("This is an unreachable statement");
  8.     }
  9. }

Invalid Escape Character
This error is thrown when you improperly use the backslash (\) in a string.
Code: Java
  1. System.out.println("Hello \ World");
To fix, you will have to either remove the backslash or add a valid escape character.

Code: Java
  1. System.out.println("Hello \\ World");

Valid Escape Characters:
\b - Backspace
\t - Tab
\n - New line
\f -  :confused:
\r - Return (enter)
\" - Quote (")
\' - Singe quote (')
\\ - Backslash

Note: ...
Code: [Select]
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.

This is just a warning, not an error. In this example you could add -deprecation to your compiler to show where deprecated APIs are used.

Code: [Select]
Javac -deprecation *.javaHere is a list of Javac options:




Common Java Exceptions   By (Anthony)


java.lang
ClassCastException - Occurs when you try to cast an object to a class which is not it's subclass, sub interface, or class.
Example:
Code: Java
  1. RsObject rsObject =new RsObject();
  2. WowObject wowObject =(WowObject) rsObject;// This line would throw a ClassCastException as rsObject is not a WowObject.
ArrayIndexOutOfBoundsException - Thrown when you try to access an index on an array which doesn't exist.
Example:
Code: Java
  1. Object[] array =newObject[200];
  2. Object obj = array[200];// Would throw an ArrayIndexOutOfBoundsException as the array indices start at 0 meaning max is 199.
NullPointerException - Thrown when you try to use an object reference who's value is null.
Example:
Code: Java
  1. Object object =null;
  2. object.notify();// Would throw NullPointerException as the object to which object points is null.


java.util
ConcurrentModificationException - Thrown when multiple threads try to read/modify an object at the same time. Multiple threads can read at the same time but multiple threads can't write at the same time, or read and write at the same time.


java.io
FileNotFoundException - Gets thrown when you try to load a file that doesn't exist.
IOException - Thrown when an errors occurs with Input/Output, this may be a reading or writing to a stream or channel problem.
NotSerializableException - Thrown when you try to serialize an object that doesn't implement Serializable.

Well that's all I can think of right now, if there are any you would like me to add just request it and I'd be happy to.
Title: Re: Common Compiler Errors
Post by: Jc22493 on May 28, 2010, 08:31:38 PM
This is Anthony's, right?
Title: Re: Common Compiler Errors
Post by: The Soul on May 28, 2010, 08:51:49 PM
This is Anthony's, right?

Yeah.
Title: Re: Common Compiler Errors
Post by: (Anthony) on May 29, 2010, 01:51:21 AM
class OneHunderedError {
   public static void main(String[] args) {
      System.out.println("This is an example of 100 errors!");
}
No, that's an example of an idiot not putting a bracket there. That would not throw 100 errors as there isn't any code being fudgeed up and in the wrong scope in the class it would probably just say someone along the lines of "Reached the end of the file while parsing".
Title: Re: Common Compiler Errors
Post by: DeathsChaos9 on May 29, 2010, 10:15:38 AM
class OneHunderedError {
   public static void main(String[] args) {
      System.out.println("This is an example of 100 errors!");
}
No, that's an example of an idiot not putting a bracket there. That would not throw 100 errors as there isn't any code being fudgeed up and in the wrong scope in the class it would probably just say someone along the lines of "Reached the end of the file while parsing".
Yea I noticed, better now?
Title: Re: Common Compiler Errors
Post by: deviltw2nz on May 29, 2010, 12:45:17 PM
Can you help me? idk if its good that i'm writing here but i got problem with illegal start of expression... can anyone fix it for me please?

Code: [Select]
public void debug(String text) {
if (debug);
sM(text);
}
public void declineTrade() {
if (disconnected) {
declineTrade(true);
}
declineTrade(true);
}
Title: Re: Common Compiler Errors
Post by: (Anthony) on May 29, 2010, 02:32:26 PM
class OneHunderedError {
   public static void main(String[] args) {
      System.out.println("This is an example of 100 errors!");
}
No, that's an example of an idiot not putting a bracket there. That would not throw 100 errors as there isn't any code being fudgeed up and in the wrong scope in the class it would probably just say someone along the lines of "Reached the end of the file while parsing".
Yea I noticed, better now?
Yeah that would throw an illegal start of expression and then a reached end of file while parsing. There aren't 100 errors to be thrown so it obviously won't throw 100 errors. But you get the general idea.
Title: Re: Common Compiler Errors
Post by: The Soul on May 29, 2010, 03:09:36 PM
Can you help me? idk if its good that i'm writing here but i got problem with illegal start of expression... can anyone fix it for me please?

Code: [Select]
public void debug(String text) {
if (debug);
sM(text);
}
public void declineTrade() {
if (disconnected) {
declineTrade(true);
}
declineTrade(true);
}

Where you're checking the first condition, if 'debug' is true or not, you have to open and close the statement.
Title: Re: Common Compiler Errors
Post by: (Anthony) on May 30, 2010, 04:32:54 AM
Can you help me? idk if its good that i'm writing here but i got problem with illegal start of expression... can anyone fix it for me please?

Code: [Select]
public void debug(String text) {
if (debug);
sM(text);
}
public void declineTrade() {
if (disconnected) {
declineTrade(true);
}
declineTrade(true);
}

Where you're checking the first condition, if 'debug' is true or not, you have to open and close the statement.
Actually right now it is perfectly legal it just has no body. His compiling issue is that his code more than likely resides within another methods body.
Title: Re: Common Compiler Errors
Post by: The Soul on May 30, 2010, 08:14:48 AM
Can you help me? idk if its good that i'm writing here but i got problem with illegal start of expression... can anyone fix it for me please?

Code: [Select]
public void debug(String text) {
if (debug);
sM(text);
}
public void declineTrade() {
if (disconnected) {
declineTrade(true);
}
declineTrade(true);
}

Where you're checking the first condition, if 'debug' is true or not, you have to open and close the statement.
Actually right now it is perfectly legal it just has no body. His compiling issue is that his code more than likely resides within another methods body.

I wasn't talking about resolving his error but rather telling him to fix that as it's pointless to have a condition if you're not going to use it.
Title: Re: Common Compiler Errors
Post by: lil.astar on June 04, 2010, 03:58:44 AM
Mine Says Cannot Create Virtual Machine. -d, Does anyone know what i can do?
Title: Re: Common Compiler Errors
Post by: ultraking x2 on June 18, 2010, 06:08:13 AM
Can you plz help me with this error, i downloaded tokkulscape 508 yesterday, but if i run the server, this happen:

Quote
Exception in thread "main" java.lang.NoClassDefFoundError: Bulby/Server
Caused by: java.lang.ClassNotFoundException: Bulby.Server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Bulby/Server.  Program will exit.
Press any key to continue. . .
Plz, help me, this is my first private server, keep it very simple plz
Title: Re: Common Compiler Errors
Post by: it0ken1 on June 18, 2010, 06:14:10 AM
Doesn't seem to find the main class of the server.
Either the archive's broken or you deleted an important file.
Title: Re: Common Compiler Errors
Post by: ultraking x2 on June 18, 2010, 06:56:33 AM
I didn't deleted any file. How can i fix this?
Title: Re: Common Compiler Errors
Post by: it0ken1 on June 18, 2010, 06:57:50 AM
I didn't deleted any file. How can i fix this?
Maybe the archive is broken. Try re-downloading the server.
If that doesn't work, I'd go with a whole new source.
Title: Re: Common Compiler Errors
Post by: ultraking x2 on June 18, 2010, 07:02:51 AM
re-downloading now, i hope this works...

 :confused: It still doen't work! Again the same error! :(

Quote
Het systeem kan het opgegeven pad niet vinden.
Exception in thread "main" java.lang.NoClassDefFoundError: Bulby/Server
Caused by: java.lang.ClassNotFoundException: Bulby.Server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Bulby/Server.  Program will exit.
Press any key to continue. . .

Any1 can help me or does any1 has a link to a tutorial for this error?
Title: Re: Common Compiler Errors
Post by: DeathsChaos9 on June 18, 2010, 12:31:09 PM
Server class isn't in the Bulby package. Check the code in the batch file and make sure that the path is set to were Server class actually is.
Title: Re: Common Compiler Errors
Post by: (Anthony) on June 18, 2010, 02:12:15 PM
Server class isn't in the Bulby package. Check the code in the batch file and make sure that the path is set to were Server class actually is.
It's also possible that he doesn't have the server files in the classpath.
Title: Re: Common Compiler Errors
Post by: Si Force on June 18, 2010, 02:54:26 PM
Do you plan on adding on to your thread and updating it? I don't think all errors are covered.
Title: Re: Common Compiler Errors
Post by: stanleyw on June 20, 2010, 12:06:18 AM
Im not sure what this is but can you please help?

Code: [Select]
The system cannot find the path specified.
javac: directory not found: ./Bin/
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .


Title: Re: Common Compiler Errors
Post by: DeathsChaos9 on June 20, 2010, 11:38:19 AM
The bin folder cannot be found.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on July 01, 2010, 07:13:57 PM
You said the class files and such were in the same directory, but what about the batch file? Also in the same directory? If so, is your class Server or server?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: mellen on July 06, 2010, 09:59:23 PM
can some1 tell me what i shoudl do with this?
javac: file not found: *.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .


dont knwo why its happing
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Music8 on July 07, 2010, 10:45:46 PM
On the try{ thing can u make a command that has that error then highlight te things we need to change? I'm trying to make killcommands and that's holding me back on it
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Teeler on July 09, 2010, 03:10:50 PM
some one help me with complier 100 errors, i just dont really get the code i want some one to teamview?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on July 09, 2010, 03:53:51 PM
You have to find where you missed the bracket.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: chance1234 on August 11, 2010, 08:18:47 AM
please help guys when i try to compile it says this,

note:some input files are unchecked or unsafe operations
note:recompile with -xlint: unchecked for details
press any key to continue.

please help!!
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 11, 2010, 01:43:49 PM
That's not a compiler error, that's just a note. ;)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Davidi2 on August 11, 2010, 02:31:51 PM
That's not a compiler error, that's just a note. ;)
You should post it anyway, it's a common mistake new people make.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 11, 2010, 03:00:23 PM
That's not a compiler error, that's just a note. ;)
You should post it anyway, it's a common mistake new people make.
Mkay, I did.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on August 11, 2010, 09:29:02 PM
Maybe you can help me with this error?
I get it trying to compile Lost Valentino's Rune Fusion..
Code: [Select]
npcpos - pos:" + stream.currentOffset + " psize:" + i);
                        ^
client.java:1750: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " null entry i
n npc list - pos:" + i1 + " size:" + npcCount);
                                ^
client.java:2243: package sign does not exist
                                                        HPBarFull = new Sprite(s
ign.signlink.findcachedir() + "Sprites/Player/HP 0.PNG", HpPercent, 7);

   ^
client.java:2414: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("18622, " + false + ", " + l + ", "
 + runtimeexception.toString());
                        ^
client.java:2945: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("15283, " + (byte)68 + ", " + l + "
, " + runtimeexception.toString());
                        ^
client.java:3431: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.storeid = 32;
                        ^
client.java:3432: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.startpriv(InetAddress.getLocalHost());
                        ^
client.java:3456: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " glcfb " + aL
ong1215 + "," + j + "," + lowMem + "," + decompressors[0] + "," + onDemandFetche
r.getNodeCount() + "," + plane + "," + anInt1069 + "," + anInt1070);
                                ^
client.java:3532: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:3533: package signlink does not exist
                        return signlink.mainapp.getAppletContext();
                                       ^
client.java:3598: package sign does not exist
                        Sprite logo = new Sprite(sign.signlink.findcachedir()+"/
Sprites/Logo.PNG");
                                                     ^
client.java:3727: cannot find symbol
symbol  : variable signlink
location: class client
                return abyte0 == null || signlink.wavesave(abyte0, i);
                                         ^
client.java:4322: cannot find symbol
symbol  : variable signlink
location: class client
                new Update(";, "cache.zip", sig
nlink.findcachedir());
                                                                             ^
client.java:5792: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.reporterror = false;
                ^
client.java:5942: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:5943: cannot find symbol
symbol  : variable signlink
location: class client
                        return signlink.mainapp;
                               ^
client.java:6746: cannot find symbol
symbol  : variable signlink
location: class client
                                class9.disabledMessage = "You last logged in " +
 s + " from: " + signlink.dns;

                 ^
client.java:7063: cannot find symbol
symbol  : variable signlink
location: class client
                if (signlink.mainapp != null) {
                    ^
client.java:7064: package signlink does not exist
                        return signlink.mainapp.getDocumentBase().getHost().toLo
werCase();
                                       ^
client.java:7205: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.errorname = s;
                ^
client.java:8135: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.sunjava)
                   ^
client.java:8139: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.cache_dat != null) {
                   ^
client.java:8141: cannot find symbol
symbol  : variable signlink
location: class client
                                decompressors[i] = new Decompressor(signlink.cac
he_dat, signlink.cache_idx[i], i + 1);
                                                                    ^
client.java:8141: cannot find symbol
symbol  : variable signlink
location: class client
                                decompressors[i] = new Decompressor(signlink.cac
he_dat, signlink.cache_idx[i], i + 1);

        ^
client.java:8188: package sign does not exist
                        HPBarFull = new Sprite(sign.signlink.findcachedir() + "S
prites/Player/HP 0.PNG", 1);
                                                   ^
client.java:8189: package sign does not exist
                        HPBarEmpty = new Sprite(sign.signlink.findcachedir() + "
Sprites/Player/HP 1.PNG", 1);
                                                    ^
client.java:8378: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("loaderror " + aString1049 + " " +
anInt1079);
                        ^
client.java:9661: cannot find symbol
symbol  : variable signlink
location: class client
                                                signlink.reporterror("cde2");
                                                ^
client.java:9799: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("glfc_ex " + myPlayer.x + "," + myP
layer.y + "," + anInt1014 + "," + anInt1015 + "," + anInt1069 + "," + anInt1070
+ "," + baseX + "," + baseY);
                        ^
client.java:9855: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.wavevol = i;
                ^
client.java:9980: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("45688, " + l + ", " + 4 + ", " + r
untimeexception.toString());
                        ^
client.java:10296: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("47229, " + 3 + ", " + l + ", " + r
untimeexception.toString());
                        ^
client.java:10312: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("47229, " + 3 + ", " + l + ", " + r
untimeexception.toString());
                        ^
client.java:10320: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:10321: package signlink does not exist
                        return signlink.mainapp.getParameter(s);
                                       ^
client.java:10328: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.midivol = i;
                ^
client.java:10330: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.midi = "voladjust";
                        ^
client.java:10905: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(myUsername + " Too many players");
                        ^
client.java:11444: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(myUsername + " Too many npcs");
                        ^
client.java:12048: cannot find symbol
symbol  : variable signlink
location: class client
                String OrbDirectory = signlink.findcachedir()+"/Sprites/Gamefram
e/Orbs/";
                                      ^
client.java:12078: cannot find symbol
symbol  : variable signlink
location: class client
                String OD = signlink.findcachedir()+"/Sprites/Gameframe/Orbs/";
                            ^
client.java:12132: cannot find symbol
symbol  : variable signlink
location: class client
                String OD = signlink.findcachedir()+"/Sprites/Gameframe/Orbs/";
                            ^
client.java:12255: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("Error packet size mismatch in getp
layer pos:" + stream.currentOffset + " psize:" + i);
                        ^
client.java:12261: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " null entry i
n pl list - pos:" + i1 + " size:" + playerCount);
                                ^
client.java:12481: cannot find symbol
symbol  : variable signlink
location: class client
                                                signlink.dnslookup(TextClass.met
hod586(anInt1193));
                                                ^
client.java:13146: cannot find symbol
symbol  : variable signlink
location: class client
                                                        signlink.reporterror("cd
e1");
                                                        ^
client.java:13510: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("T1 - " + pktType + "," + pktSize +
 " - " + anInt842 + "," + anInt843);
                        ^
client.java:13518: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(s2);
                        ^
OnDemandFetcher.java:42: cannot find symbol
symbol  : variable signlink
location: class OnDemandFetcher
                        signlink.reporterror("Rej: " + l + "," + j1);
                        ^
OnDemandFetcher.java:380: cannot find symbol
symbol  : variable signlink
location: class OnDemandFetcher
            signlink.reporterror("od_ex " + exception.getMessage());
            ^
Sprite.java:22: cannot find symbol
symbol  : variable signlink
location: class Sprite
        public String location = signlink.findcachedir() + "/Sprites/";
                                 ^
CacheDownloader.java:51: cannot find symbol
symbol  : variable signlink
location: class CacheDownloader
                return signlink.findcachedir();
                       ^
Gui.java:32: package sign does not exist
                        sign.signlink.startpriv(InetAddress.getByName("127.0.01"
));
                            ^
ModelDecompressor.java:17: cannot find symbol
symbol  : variable signlink
location: class ModelDecompressor
                        DataInputStream indexFile = new DataInputStream(new File
InputStream(signlink.findcachedir()+"null_cache.idx"));

            ^
ModelDecompressor.java:18: cannot find symbol
symbol  : variable signlink
location: class ModelDecompressor
                        DataInputStream dataFile = new DataInputStream(new FileI
nputStream(signlink.findcachedir()+"null_cache.dat"));

           ^
TextClass.java:50: cannot find symbol
symbol  : variable signlink
location: class TextClass
                        signlink.reporterror("81570, " + l + ", " + (byte)-99 +
", " + runtimeexception.toString());
                        ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
89 errors
Press any key to continue . . .
Any Ideas o.o
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 11, 2010, 09:32:14 PM
Are you importing signlink in client class?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on August 11, 2010, 09:39:07 PM
Are you importing signlink in client class?
Uhhh whats that mean? >.<
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: doom_j on August 11, 2010, 10:28:06 PM
Are you importing signlink in client class?
Uhhh whats that mean? >.<

like; import singlink.SingLink;
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Davidi2 on August 12, 2010, 01:30:47 AM
Are you importing signlink in client class?
Uhhh whats that mean? >.<

like; import singlink.SingLink;
Not Sing, sign :P
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: doom_j on August 12, 2010, 11:18:33 AM
Are you importing signlink in client class?
Uhhh whats that mean? >.<

like; import singlink.SingLink;
Not Sing, sign :P

Opps, I guess I wasn't really watching what I was typing. :P
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on August 12, 2010, 05:04:53 PM
Signlink.java:
Code: [Select]
package sign;

import java.applet.Applet;
import java.io.*;
import java.net.*;

public final class signlink
    implements Runnable
{
    public static void startpriv(InetAddress inetaddress)
    {
        threadliveid = (int)(Math.random() * 99999999D);
        if(active)
        {
            try
            {
                Thread.sleep(500L);
            }
            catch(Exception _ex) { }
            active = false;
        }
        socketreq = 0;
        threadreq = null;
        dnsreq = null;
        savereq = null;
        urlreq = null;
        socketip = inetaddress;
        Thread thread = new Thread(new signlink());
        thread.setDaemon(true);
        thread.start();
        while(!active)
            try
            {
                Thread.sleep(50L);
            }
            catch(Exception _ex) { }
    }

    public void run()
    {
        active = true;
        String s = findcachedir();
        uid = getuid(s);
        try
        {
            File file = new File(s + "main_file_cache.dat");
            if(file.exists() && file.length() > 0x3200000L)
                file.delete();
            cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw");
            for(int j = 0; j < 5; j++)
                cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw");

        }
        catch(Exception exception)
        {
            exception.printStackTrace();
        }
        for(int i = threadliveid; threadliveid == i;)
        {
            if(socketreq != 0)
            {
                try
                {
                    socket = new Socket(socketip, socketreq);
                }
                catch(Exception _ex)
                {
                    socket = null;
                }
                socketreq = 0;
            } else
            if(threadreq != null)
            {
                Thread thread = new Thread(threadreq);
                thread.setDaemon(true);
                thread.start();
                thread.setPriority(threadreqpri);
                threadreq = null;
            } else
            if(dnsreq != null)
            {
                try
                {
                    dns = InetAddress.getByName(dnsreq).getHostName();
                }
                catch(Exception _ex)
                {
                    dns = "unknown";
                }
                dnsreq = null;
            } else
            if(savereq != null)
            {
                if(savebuf != null)
                    try
                    {
                        FileOutputStream fileoutputstream = new FileOutputStream(s + savereq);
                        fileoutputstream.write(savebuf, 0, savelen);
                        fileoutputstream.close();
                    }
                    catch(Exception _ex) { }
                if(waveplay)
                {
                    String wave = s + savereq;
                    waveplay = false;
                }
                if(midiplay)
                {
                    midi = s + savereq;
                    midiplay = false;
                }
                savereq = null;
            } else
            if(urlreq != null)
            {
                try
                {
                    System.out.println("urlstream");
                    urlstream = new DataInputStream((new URL(mainapp.getCodeBase(), urlreq)).openStream());
                }
                catch(Exception _ex)
                {
                    urlstream = null;
                }
                urlreq = null;
            }
            try
            {
                Thread.sleep(50L);
            }
            catch(Exception _ex) { }
        }

    }

   

public static String findcachedir()
    {
        String as[] = {
            "./.ss_474/"
        };
        if(storeid < 32 || storeid > 34)
            storeid = 32;
        String s = "";
        for(int i = 0; i < as.length; i++)
            try
            {
                String s1 = as[i];
                if(s1.length() > 0)
                {
                    File file = new File(s1);
                    if(!file.exists())
                        continue;
                }
                File file1 = new File(s1 + s);
                if(file1.exists() || file1.mkdir())
                    return s1 + s + "/";
            }
            catch(Exception _ex) { }

        return null;
    }


public static String sencondDir() {
File file = new File("c:/.ss_474/");
if (!file.exists())
file.mkdir();
return file.toString();
}

    private static int getuid(String s) {
        return 234523;
    }

    public static synchronized Socket opensocket(int i)
        throws IOException
    {
        for(socketreq = i; socketreq != 0;)
            try
            {
                Thread.sleep(50L);
            }
            catch(Exception _ex) { }

        if(socket == null)
            throw new IOException("could not open socket");
        else
            return socket;
    }

    public static synchronized DataInputStream openurl(String s)
        throws IOException
    {
        for(urlreq = s; urlreq != null;)
            try
            {
                Thread.sleep(50L);
            }
            catch(Exception _ex) { }

        if(urlstream == null)
            throw new IOException("could not open: " + s);
        else
            return urlstream;
    }

    public static synchronized void dnslookup(String s)
    {
        dns = s;
        dnsreq = s;
    }

    public static synchronized void startthread(Runnable runnable, int i)
    {
        threadreqpri = i;
        threadreq = runnable;
    }

    public static synchronized boolean wavesave(byte abyte0[], int i)
    {
        if(i > 0x1e8480)
            return false;
        if(savereq != null)
        {
            return false;
        } else
        {
            wavepos = (wavepos + 1) % 5;
            savelen = i;
            savebuf = abyte0;
            waveplay = true;
            savereq = "sound" + wavepos + ".wav";
            return true;
        }
    }

    public static synchronized boolean wavereplay()
    {
        if(savereq != null)
        {
            return false;
        } else
        {
            savebuf = null;
            waveplay = true;
            savereq = "sound" + wavepos + ".wav";
            return true;
        }
    }

    public static synchronized void midisave(byte abyte0[], int i)
    {
        if(i > 0x1e8480)
            return;
        if(savereq != null)
        {
        } else
        {
            midipos = (midipos + 1) % 5;
            savelen = i;
            savebuf = abyte0;
            midiplay = true;
            savereq = "jingle" + midipos + ".mid";
        }
    }

    public static void reporterror(String s)
    {
        System.out.println("Error: " + s);
    }

    private signlink()
    {
    }

    public static final int clientversion = 317;
    public static int uid;
    public static int storeid = 32;
    public static RandomAccessFile cache_dat = null;
    public static final RandomAccessFile[] cache_idx = new RandomAccessFile[5];
    public static boolean sunjava;
    public static Applet mainapp = null;
    private static boolean active;
    private static int threadliveid;
    private static InetAddress socketip;
    private static int socketreq;
    private static Socket socket = null;
    private static int threadreqpri = 1;
    private static Runnable threadreq = null;
    private static String dnsreq = null;
    public static String dns = null;
    private static String urlreq = null;
    private static DataInputStream urlstream = null;
    private static int savelen;
    private static String savereq = null;
    private static byte[] savebuf = null;
    private static boolean midiplay;
    private static int midipos;
    public static String midi = null;
    public static int midivol;
    public static int midifade;
    private static boolean waveplay;
    private static int wavepos;
    public static int wavevol;
    public static boolean reporterror = true;
    public static String errorname = "";

}
Help Plawx? :(
Error is above O.o
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 12, 2010, 05:18:58 PM
Theres nothing wrong with signlink, client class if the problem. We asked if you were importing signlink..
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: startcode on August 17, 2010, 04:56:02 AM
hi,
thank you for ur guide it helped me a lot, but i still have a problem with an orphaned case.
i follow the steps like u said but it stays an orphaned case =/ it's the last error i have before i can code my server.

please help me,

thank you,

startcode
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 17, 2010, 10:59:41 AM
All you have to do is move the case inside a switch statement.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: startcode on August 17, 2010, 11:11:37 AM
yh but when i do that i still get an error. or maybe i do it wrong but when i put that case somewhere else i get the error that another case is orphaned.
Does it help when i show you how i put the cases?
if so just say
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 17, 2010, 01:12:53 PM
Posting a snippet of the code would be helpful.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: startcode on August 17, 2010, 01:21:00 PM
case 746:
      if(buttonId == 49) //music tab
         p.getActionSender().setInterface(p, 1, 746, 71, 187);
      else if (buttonId == 48) //emote tab
         p.getActionSender().setInterface(p, 1, 746, 71, 464);
      else if (buttonId == 47) //setting tab
         p.getActionSender().setInterface(p, 1, 746, 71, 261);
      else if (buttonId == 46) //clan chat
         p.getActionSender().setInterface(p, 1, 746, 71, 589);
      else if (buttonId == 45) //ignore tab
         p.getActionSender().setInterface(p, 1, 746, 71, 551);
      else if (buttonId == 44) //friends list tab
         p.getActionSender().setInterface(p, 1, 746, 71, 550);
      else if (buttonId == 42) //magic tab
         p.getActionSender().setInterface(p, 1, 746, 71, 192);
      else if (buttonId == 41) //prayer tab
         p.getActionSender().setInterface(p, 1, 746, 71, 271);
      else if (buttonId == 40) //Equipment tab
         p.getActionSender().setInterface(p, 1, 746, 71, 387);
      else if (buttonId == 39) //Inventory tab
         p.getActionSender().setInterface(p, 1, 746, 71, 149);
      else if (buttonId == 38) //quest tab
         p.getActionSender().setInterface(p, 1, 746, 71, 274); 
      else if (buttonId == 37) //Skill tab
         p.getActionSender().setInterface(p, 1, 746, 71, 320);
      else if (buttonId == 36) {//Attack tab
         p.playerWeapon.setWeapon();
         p.getActionSender().setInterface(p, 1, 746, 71, 92);
         }
      else if (buttonId == 35) //sum tab
         p.getActionSender().setInterface(p, 1, 746, 71, 92);
      else if (buttonId == 12) //Logout.
         p.getActionSender().setInterface(p, 1, 746, 71, 182);
      
      break;

            case 763:
                /*
                * Inventory interface with banking.
                */
                if (p.interfaceId != 762) {
                    return;
                }
                if (buttonId == 0) {
                    if (packetId == 233)
                        Engine.playerBank.bankItem(p, buttonId2, 1);
                    else if (packetId == 21)
                        Engine.playerBank.bankItem(p, buttonId2, 5);
                    else if (packetId == 169)
                        Engine.playerBank.bankItem(p, buttonId2, 10);
                    else if (packetId == 214)
                        Engine.playerBank.bankItem(p, buttonId2, 50);
                     if (packetId == 173);
                        p.input.request(3, buttonId2);
                     if (packetId == 232)//X
                        Engine.playerBank.bankItem(p, buttonId2, Engine.playerItems.invItemCount(p, p.items[buttonId2]));
          else if (packetId == 90)   //examine
         p.getActionSender().sendMessage(p, Engine.items.getItemDescription(p.items[buttonId2]));
                }
                break;


   
 

   case 640:
       if (buttonId == 18) {
      p.getActionSender().removeShownInterface(p);
      p.teleportTo(3087 + Misc.random(2), 3518 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
       }
       if (buttonId == 19) {
      p.getActionSender().removeShownInterface(p);
      p.teleportTo(3243 + Misc.random(8), 3533 + Misc.random(8), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
       }
       if (buttonId == 20) {
      p.getActionSender().removeShownInterface(p);
      p.teleportTo(3091 + Misc.random(2), 3963 + Misc.random(2), 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
       }
   break;


 case 637:
            Misc.println("[" + p.username + "] Unhandled button: " + interfaceId + ", " + buttonId + ":" + buttonId2);
       if (buttonId == 14) {
      Player pl = Server.engine.players[p.duelFriend];
      if (p != null && pl != null) {
         p.getActionSender().removeShownInterface(p);
         pl.getActionSender().removeShownInterface(pl);
         p.getDuelClass().resetDuelSettings1();
              pl.getDuelClass().resetDuelSettings1();
      }
       }
       if (buttonId == 83) {/* Accept */
      Player pl = Server.engine.players[p.duelFriend];
      if (p != null && pl != null) {
         p.acceptScreen1 = true;
         p.getActionSender().sendMessage(p, "Accepted duel.");
      }
       }
       if (buttonId == 86) {/* Decline */
      Player pl = Server.engine.players[p.duelFriend];
      if (p != null && pl != null) {
         p.getActionSender().removeShownInterface(p);
         pl.getActionSender().removeShownInterface(pl);
         p.getDuelClass().resetDuelSettings1();
              pl.getDuelClass().resetDuelSettings1();

 

       }
          }
          break;

case 762:
            /*
             * Bank interface.
             */
            if (buttonId == 73) {
                if (packetId == 233)   //1
                    Engine.playerBank.bankWithdraw(p, buttonId2, 1);
                else if (packetId == 21)   //5
                    Engine.playerBank.bankWithdraw(p, buttonId2, 5);
                else if (packetId == 169)   //10
                    Engine.playerBank.bankWithdraw(p, buttonId2, 10);
            else if (packetId == 214)   //lastX
         

             if (packetId == 173) {   //X
               p.input.request(2, buttonId2);
               //p.input.request(2, buttonId2); This is mine, replace with yours
            } else if (packetId == 232)   //all
                    Engine.playerBank.bankWithdraw(p, buttonId2, p.bankItemsN[buttonId2]);
            else if (packetId == 133)   //all but one
               Engine.playerBank.bankWithdraw(p, buttonId2, p.bankItemsN[buttonId2] -1);
            else if (packetId == 90)   //examine
                p.getActionSender().sendMessage(p, Engine.items.getItemDescription(p.bankItems[buttonId2]));
  { {             
 break;
          }    if (buttonId == 22) {
            //p.getActionSender().restoreTabs(p); This is mine, close interface button, you might have other methods to show inventory again
         } else if (buttonId == 16) {
            
         } else if (buttonId == 14) {
            
         } else if (buttonId == 41 || buttonId == 39 || buttonId == 37 || buttonId == 35 || buttonId == 33 || buttonId == 31 || buttonId == 29 || buttonId == 27 || buttonId == 25) { //Tab buttons
            if(packetId == 21) { //Collapse
         }
          break;
     default:
            Misc.println("[" + p.username + "] Unhandled button: " + interfaceId + ", " + buttonId + ":" + buttonId2);
 { { { { { { { { { { {
  break;

        }
    }
}

}

}


these are just a few cases, but i get the error at default. so if u can tell me what to do it would be helpful.  Thank you
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 17, 2010, 01:22:43 PM
Could you just PM me the entire method?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: startcode on August 17, 2010, 01:25:18 PM
u mean evertyhing what's in action.buttons.java?
sorry for all the questions but i'm new to this coding stuff.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 17, 2010, 01:26:51 PM
Sure.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: xXPsych0Xx on August 17, 2010, 02:11:06 PM
I cant find wat u put on here but my compiler says..

javac:file not found: *.javac
Usage:javac<options><source files>
use -help for a list of possible options
Finished!
press any key..
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 17, 2010, 02:11:57 PM
Its suppose to be *.java not *.javac
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: xXPsych0Xx on August 18, 2010, 01:01:35 AM
Where do i put Javac -deprecation *.java in my compiler?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 18, 2010, 01:05:35 AM
That is the compiler code, rather than using Javac *.java it would be Javac -deprecation *.java
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: imsuperman05 on August 18, 2010, 04:06:05 PM
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
        at server.world.ItemHandler.loadItemList(ItemHandler.java:365)
        at server.world.ItemHandler.<init>(ItemHandler.java:33)
        at server.Server.<clinit>(Server.java:59)
Could not find the main class: server.Server.  Program will exit.
Press any key to continue . . .


ok i tried to code d claws from a tutorial and it messed up my server how can i fix this?????????????
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 18, 2010, 04:11:26 PM
You added to many numbers to the information you added to item.cfg
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: imsuperman05 on August 18, 2010, 04:15:00 PM
You added to many numbers to the information you added to item.cfg

i just changed the numbers in item.cfg but i dont know if my compiler is even working right cause it still shows same error if you are not busy and have msn add me [email protected]
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Davidi2 on August 20, 2010, 09:12:49 PM
This thread (https://forum.moparscape.org/index.php/topic,349078.0.html/) and this thread (https://forum.moparscape.org/index.php/topic,438121.0.html/) should be combined. There is no point having two stuck threads about compilers.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: veteran god: king cesar on August 24, 2010, 06:20:21 PM
"100 errors"

I've got 96 more "{" brackets, then I do "}" brackets, and no clue which file is missing some. Do I have to go through each file to find out which is missing a few? even more so, does it matter where I place them in the file, after I have figured out which file needs them...?

Basically... I'm looking for a quick easy fix.  :D

Anyone care to help me out?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 24, 2010, 06:33:14 PM
I guess you did "}" Count and "{" Count?
If so, remember that the program will count commented brackets too. The quick and easy fix is to use an IDE to try to isolate the missing bracket, though its not always accurate.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: veteran god: king cesar on August 24, 2010, 07:27:20 PM
I've narrowed it down quite drastically...

i know that there is either one extra "{" bracket, or one missing "}" bracket, in my class34 file.

I've got no idea where, nor any idea of how to find out.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on August 27, 2010, 05:32:17 PM
Its meaning nothing, its not an error or anything; its just a note.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on September 02, 2010, 06:23:29 PM
I just downloaded MarcBob's MTP client + source and as usual i get an error compiling the client -.-

location: class client
                signlink.midisave(abyte0, abyte0.length);
                ^
client.java:587: cannot find symbol
symbol  : variable signlink
location: class client
                                        if (FileOperations.FileExists(signlink.f
indcachedir()+"maps/"+anIntArray1235[i3]+".dat"))
                                                                      ^
client.java:588: cannot find symbol
symbol  : variable signlink
location: class client
                                                abyte0 = FileOperations.ReadFile
(signlink.findcachedir()+"maps/"+anIntArray1235[i3]+".dat");

 ^
client.java:685: cannot find symbol
symbol  : variable signlink
location: class client
                                    if (FileOperations.FileExists(signlink.findc
achedir()+"maps/"+anIntArray1235[k12]+".dat"))
                                                                  ^
client.java:686: cannot find symbol
symbol  : variable signlink
location: class client

abyte0 = FileOperations.ReadFile(signlink.findcachedir()+"maps/"+anIntArray1235[
k12]+".dat");

                                 ^
client.java:734: cannot find symbol
symbol  : variable signlink
location: class client
                if(lowMem && signlink.cache_dat != null)
                             ^
client.java:935: cannot find symbol
symbol  : variable signlink
location: class client
                        return signlink.wavereplay();
                               ^
client.java:1348: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(myUsername + " size mismatch in get
npcpos - pos:" + stream.currentOffset + " psize:" + i);
                        ^
client.java:1354: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " null entry i
n npc list - pos:" + i1 + " size:" + npcCount);
                                ^
client.java:1795: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("18622, " + false + ", " + l + ", "
 + runtimeexception.toString());
                        ^
client.java:2159: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("15283, " + (byte)68 + ", " + l + "
, " + runtimeexception.toString());
                        ^
client.java:2659: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.storeid = Integer.parseInt(args[4]);
                        ^
client.java:2660: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.startpriv(InetAddress.getLocalHost());
                        ^
client.java:2680: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " glcfb " + aL
ong1215 + "," + j + "," + lowMem + "," + decompressors[0] + "," + onDemandFetche
r.getNodeCount() + "," + plane + "," + anInt1069 + "," + anInt1070);
                                ^
client.java:2756: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:2757: package signlink does not exist
                        return signlink.mainapp.getAppletContext();
                                       ^
client.java:2932: cannot find symbol
symbol  : variable signlink
location: class client
                return abyte0 == null || signlink.wavesave(abyte0, i);
                                         ^
client.java:3580: cannot find symbol
symbol  : variable signlink
location: class client
                                if(!signlink.reporterror)
                                    ^
client.java:3587: cannot find symbol
symbol  : variable signlink
location: class client
                                if(!signlink.reporterror)
                                    ^
client.java:3594: cannot find symbol
symbol  : variable signlink
location: class client
                                if(!signlink.reporterror)
                                    ^
client.java:4891: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.reporterror = false;
                ^
client.java:5028: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:5029: cannot find symbol
symbol  : variable signlink
location: class client
                        return signlink.mainapp;
                               ^
client.java:5812: cannot find symbol
symbol  : variable signlink
location: class client
                                class9.message = "You last logged in " + s + " f
rom: " + signlink.dns;

         ^
client.java:6099: cannot find symbol
symbol  : variable signlink
location: class client
                if (signlink.mainapp != null) {
                    ^
client.java:6100: package signlink does not exist
                        return signlink.mainapp.getDocumentBase().getHost().toLo
werCase();
                                       ^
client.java:6303: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.errorname = s;
                ^
client.java:7228: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.sunjava)
                   ^
client.java:7238: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.cache_dat != null)
                   ^
client.java:7241: cannot find symbol
symbol  : variable signlink
location: class client
                                decompressors[i] = new Decompressor(signlink.cac
he_dat, signlink.cache_idx[i], i + 1);
                                                                    ^
client.java:7241: cannot find symbol
symbol  : variable signlink
location: class client
                                decompressors[i] = new Decompressor(signlink.cac
he_dat, signlink.cache_idx[i], i + 1);

        ^
client.java:7608: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("loaderror " + aString1049 + " " +
anInt1079);
                        ^
client.java:8763: cannot find symbol
symbol  : variable signlink
location: class client
                                                signlink.reporterror("cde2");
                                                ^
client.java:8901: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("glfc_ex " + myPlayer.x + "," + myP
layer.y + "," + anInt1014 + "," + anInt1015 + "," + anInt1069 + "," + anInt1070
+ "," + baseX + "," + baseY);
                        ^
client.java:8956: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.wavevol = i;
                ^
client.java:9082: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("45688, " + l + ", " + 4 + ", " + r
untimeexception.toString());
                        ^
client.java:9440: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("47229, " + 3 + ", " + l + ", " + r
untimeexception.toString());
                        ^
client.java:9456: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("47229, " + 3 + ", " + l + ", " + r
untimeexception.toString());
                        ^
client.java:9464: cannot find symbol
symbol  : variable signlink
location: class client
                if(signlink.mainapp != null)
                   ^
client.java:9465: package signlink does not exist
                        return signlink.mainapp.getParameter(s);
                                       ^
client.java:9472: cannot find symbol
symbol  : variable signlink
location: class client
                signlink.midivol = i;
                ^
client.java:9474: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.midi = "voladjust";
                        ^
client.java:10006: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(myUsername + " Too many players");
                        ^
client.java:10499: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(myUsername + " Too many npcs");
                        ^
client.java:10743: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("Error packet size mismatch in getp
layer pos:" + stream.currentOffset + " psize:" + i);
                        ^
client.java:10749: cannot find symbol
symbol  : variable signlink
location: class client
                                signlink.reporterror(myUsername + " null entry i
n pl list - pos:" + i1 + " size:" + playerCount);
                                ^
client.java:10965: cannot find symbol
symbol  : variable signlink
location: class client
                                                signlink.dnslookup(TextClass.met
hod586(anInt1193));
                                                ^
client.java:11621: cannot find symbol
symbol  : variable signlink
location: class client
                                                        signlink.reporterror("cd
e1");
                                                        ^
client.java:11975: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror("T1 - " + pktType + "," + pktSize +
 " - " + anInt842 + "," + anInt843);
                        ^
client.java:11983: cannot find symbol
symbol  : variable signlink
location: class client
                        signlink.reporterror(s2);
                        ^
OnDemandFetcher.java:51: cannot find symbol
symbol  : variable signlink
location: class OnDemandFetcher
                                signlink.reporterror("Rej: " + l + "," + j1);
                                ^
OnDemandFetcher.java:400: cannot find symbol
symbol  : variable signlink
location: class OnDemandFetcher
            signlink.reporterror("od_ex " + exception.getMessage());
            ^
CacheDownloader.java:40: cannot find symbol
symbol  : variable signlink
location: class CacheDownloader
                return signlink.findcachedir();
                       ^
Jframe.java:18: package sign does not exist
                        sign.signlink.startpriv(InetAddress.getByName(server));
                            ^
TextClass.java:50: cannot find symbol
symbol  : variable signlink
location: class TextClass
                        signlink.reporterror("81570, " + l + ", " + (byte)-99 +
", " + runtimeexception.toString());
                        ^
Note: client.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
76 errors
Press any key to continue . . .
Please Help DeathChaos :(
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on September 02, 2010, 06:34:23 PM
Sometimes that happens when the sign folder is read only, or the signlink file is read only. Make sure that neither of them are read-only. Secondly, make sure client class is importing signlink.
Code: Java
  1. importsign.signlink;
If neither of those work, throw the client into an IDE and see if it will compile there.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on September 02, 2010, 06:44:19 PM
Im not pro like u i have no idea what you just said o.o
talk in noob please?

This is all the client is importing

import java.applet.AppletContext;
import java.awt.*;
import java.io.*;
import java.math.BigInteger;
import java.net.*;
import java.util.zip.CRC32;
import java.lang.reflect.Method;
import sign.signlink;
import javax.swing.*;
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on September 02, 2010, 07:34:55 PM
You are importing signlink, now check to see if you sign folder & signlink file are read only.

Right click the folder, select properties. There will be a box near the bottom saying Read-only, if the box is highlighted, deselect it and hit apply, than try compiling. This has happened to me before as well, and sometimes the read only never likes to change, so mess around with it, and if all hope is lost, download a Java IDE and use it to compile the client.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on September 02, 2010, 08:44:25 PM
You are importing signlink, now check to see if you sign folder & signlink file are read only.

Right click the folder, select properties. There will be a box near the bottom saying Read-only, if the box is highlighted, deselect it and hit apply, than try compiling. This has happened to me before as well, and sometimes the read only never likes to change, so mess around with it, and if all hope is lost, download a Java IDE and use it to compile the client.
All hope failed :(
I found a nice Java IDE :D
Ty
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on September 02, 2010, 09:18:38 PM
IDE stands for Integrated Development Environment. I use Eclipse, its relatively easy to use.
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliosr
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: riku9182 on September 02, 2010, 09:49:43 PM
Idk wtf i did but i compiled a couple things now the server doesnt connect..
Its on localhost
Do i have to compile all the files first?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: CookieScape on September 07, 2010, 08:25:19 PM


HALP!
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on September 07, 2010, 08:26:31 PM
Try changing it from teleportToX and teleportToY to just toX and toY. The current variables haven't been declared.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: CookieScape on September 07, 2010, 08:28:07 PM
It worked, thank you very much, and fudge. Sorry, I didn't have time to crop. I tried changing it to toX and toY in the first place, but I accidentally capitalized To, getting the same errors, rookie mistake.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: me caveman on September 19, 2010, 05:36:39 PM
nevermind
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: iTzM3B00M on September 25, 2010, 12:50:35 PM
I was trying to help my friend connect to my ip but there wasn't a compiler included so i had to make one.

It comes up with:
Code: [Select]
invalid flag: *.javac
usage: Javac (options) (source files)
use -help for a list of possible options.
Compiling finished!

any help? he's running windows xp. it would be easier if it wasnt in dutch -.-'


i changed all the javac's to java and it comes up with:
(http://www.yourfilelink.com/get.php?fid=576057)

If that never appeared. it's: http://www.yourfilelink.com/get.php?fid=576057
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on September 26, 2010, 08:48:31 AM
Its suppose to be *.java not *.javac.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: dancey88 on October 10, 2010, 02:56:19 PM
just says you do not have jdk 5.0 or 6.0 installed which i have jdk and i dont get how to set my enviormental variables i have jdk 6u17 or 16
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Scape-JAVA on October 14, 2010, 07:05:49 PM
just says you do not have jdk 5.0 or 6.0 installed which i have jdk and i dont get how to set my enviormental variables i have jdk 6u17 or 16

Try this
https://forum.moparscape.org/index.php/topic,375681.0.html/
Or follow the souls tutorial on how to make a server it's included in the post.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Ground zero 317 on October 14, 2010, 09:21:49 PM
Code: [Select]
src\server\model\players\Client.java:1808: cannot find symbol
symbol  : class QuestHandler
location: class server.model.players.Client
        public QuestHandler QH() {
               ^
src\server\model\players\Client.java:1809: cannot find symbol
symbol  : variable QuestHandler
location: class server.model.players.Client
                return QuestHandler;
                       ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Press any key to continue . . .
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: lachdylan on October 16, 2010, 05:47:29 PM
 hi how do u put a server online could u help me put one on.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: LostWorldPete on October 18, 2010, 12:43:32 PM
client.java:15649: illegal start of expression
if(Dclaws == 3))  {
                    ^
client.java:15652: illegal start of expression
if(Dclaws == 2))  {
                    ^
client.java:15656: illegal start of expression
if(Dclaws == 1))  {
                    ^
client.java:15660: illegal start of expression
if(Dclaws > 0))  {
                  ^
4 errors


i know its probably really simple just could someone be a nice guy/girl and help :) thanks
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on October 18, 2010, 02:58:02 PM
The second ')' is unneeded on all four of those lines.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: LostWorldPete on October 18, 2010, 03:05:44 PM
thanks and when i did that i got 100 errors but i fixed them :p
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: xryz on October 20, 2010, 02:02:48 PM
ok i have some experience with programming not as experience as if i was certified or had a degree but ok. i compiled hyperion no error. i run it, it starts no errors. i go into my browser and goto 127.0.0.1:8080/ the client starts loading then when it gets to connecting to update server the jvm crashes. im pretty sure its the jvm and not the server. i have done this on 2 computers with different versions of hyperion and jres. both times i get the same error. i havent got this error with any other java application and months ago when i was messing around with hyperion i did not have this problem. any answers would be nice thx. here is a link to a folder where i put the log files of the error: https://www.mediafire.com/?0kahhdowkungf (https://www.mediafire.com/?0kahhdowkungf)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: runescapelolz on November 01, 2010, 05:00:14 PM
"javac: file not found: *.java
usage: javac <options> <source files>
use -help for a list of possible options
type any key to continue..."

this is whats in compile notepad:

@echo off
Title Compiler
"C:\Program Files\Java\jdk1.6.0_22\bin\javac.exe" *.java
pause

whats wrong? should i change the path to something else or do i need to get a missing file? all answears will be appreciated  :cool:
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: doom_j on November 04, 2010, 07:56:52 PM
"javac: file not found: *.java
usage: javac <options> <source files>
use -help for a list of possible options
type any key to continue..."

this is whats in compile notepad:

@echo off
Title Compiler
"C:\Program Files\Java\jdk1.6.0_22\bin\javac.exe" *.java
pause

whats wrong? should i change the path to something else or do i need to get a missing file? all answears will be appreciated  :cool:

That isn't even related to this topic......

Also it should be .*java
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Syfal on November 12, 2010, 12:29:02 PM
When Illegal Start of Expression is shown, something may be wrong with the code above the indicated area.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: new moon on November 17, 2010, 02:14:41 PM
evrytime ther comes whit me when i open compiler there comes this:


compiling.....
 you do not have Java Installed.please download it at the site that is about to load.
 het syteem kan het opgegeven pad niet vinden
 compiling finished.
 druk op een toets om door te gaan
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: pk owned u on November 26, 2010, 03:56:35 PM
Quote
javac: file not found: *.java
Usage: javac <options> <source files>
use -help for a list of possible options
Finished!
Press any key to continue . . .

I get that message when trying to compile - i have tried using different compilers - doesn't work.
My compiler works fine for other servers.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: javamantle on December 04, 2010, 07:43:53 AM
nice job
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Never-Lose on December 07, 2010, 04:00:27 PM
I have 508 Server and i need a compiler which must be working DeathChaos , Can you reply me? :)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on December 07, 2010, 04:14:53 PM
I'm not sure what you mean by working compiler.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: x1 att ftw x on December 16, 2010, 11:41:26 AM
Ineed your help on my compiler if possable

On notpad it says @echo off
@title Compile
echo Compiling...
"C:\Program Files\Java\jdk1.6.0_23\bin\javac.exe" -d bin src/sign/*.java src/*.java
pause
exit

and on compiler it says
Compiling....
the system could not find the path specified
press any key to continue.

can u fix this up for me?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: adrian1372 on December 17, 2010, 12:31:30 PM
I get this error when I try to compile my server, its the code for jad I think.

(http://%20help/Compilererror1JPG.jpg)
(http://%20help/Compilererror2JPG.jpg)

I dnt rly get what class interface or enum means, =\
I see u didnt post that error so...

(This not supposed to be posted here? tell me and I will remove)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: abatssk8ter on December 17, 2010, 12:33:48 PM
I get this error when I try to compile my server, its the code for jad I think.

[IMG%20help/Compilererror1JPG.jpg[/img][IMG%20help/Compilererror2JPG.jpg[/img]

I dnt rly get what class interface or enum means, =\
I see u didnt post that error so...

(This not supposed to be posted here? tell me and I will remove)
Please don't try coding a server before you learn java.
//facepalm
it's so obvious, your brackets are all in fudgeed up places, after every import? each { must be paired with a }
delete your client.java, then go ahead and go to your .rar that you download extract the other client.java and then drag back into your folder.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: wii123 on December 17, 2010, 09:34:33 PM
i know an issue:
Says: "you dont have JDK 5.0 or 6.0"
I do have JDk insatlled- i hve changed environmental variables, peaople have told me to edit compiler and paste stuff i have tryed like 3 different of them please help!
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: auroth on December 18, 2010, 05:22:57 PM
Hey You didn't post "Illegal characters". There was a word in between "Illegal And Characters"  but i cant remember wat it is so yeah plz help me i cant edit my rsps at all until ive fixed this error plz help!

EDIT: I fixed the error, i reset my pc on windows xp installed 4 different versions of jdk and it worked so thanks for trying to help tho  :o :D :o
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Scape-JAVA on December 18, 2010, 05:42:33 PM
Hey You didn't post "Illegal characters". There was a word in between "Illegal And Characters"  but i cant remember wat it is so yeah plz help me i cant edit my rsps at all until ive fixed this error plz help!

Whats your error?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on December 18, 2010, 07:06:30 PM
Hey You didn't post "Illegal characters". There was a word in between "Illegal And Characters"  but i cant remember wat it is so yeah plz help me i cant edit my rsps at all until ive fixed this error plz help!
Illegal escape character? If so, I added it.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: ethanpk on December 22, 2010, 06:29:04 PM
ok i am trying a source called "v8 dds-specz - from loved and xx k03d xx" and when i run the compiler it will tell me i have 94 errors i will upload screenshots so you can see if you can help me thanks.

Code: [Select]
@echo off
title Dds-specz Compiler
color 0A
javac *.java
pause


there is what the compiler is because i think its wrong... :| thanks in advance who ever can help me
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: rova1 on December 22, 2010, 07:29:06 PM
ok i am trying a source called "v8 dds-specz - from loved and xx k03d xx" and when i run the compiler it will tell me i have 94 errors i will upload screenshots so you can see if you can help me thanks.

Code: [Select]
@echo off
title Dds-specz Compiler
color 0A
javac *.java
pause


there is what the compiler is because i think its wrong... :| thanks in advance who ever can help me

you messed up yo, all that stuff was commented out originally:

Code: [Select]
//dueling variables/*
***************************************************************************************



Made by xx k03d xx aka bombs pure founder of Dds-specz since 2007




****************************************************************************************
*/
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: rova1 on December 23, 2010, 02:31:20 PM
Code: [Select]
//dueling variables/*
***************************************************************************************



Made by xx k03d xx aka bombs pure founder of Dds-specz since 2007




****************************************************************************************
*/
You realize that everything after the first line isn't commented, right?

Oops didn't look at it right (used notepad at time lol), it's just I downloaded same source, and didn't realise it came with errors in it...

no need for fancy shit, this would do same and leave his credits there:

Code: Java
  1.         //dueling variables (Made by xx k03d xx aka bombs pure founder of Dds-specz since 2007)
  2.  
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Xellania on January 16, 2011, 12:19:09 PM
I have a error, i always have... doens't matter what source i'm using.

This is the error:
Code: [Select]

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M
ain
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.sun.tools.javac.Main.  Program will exit.


Help plz ?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: halflive9 on January 26, 2011, 12:06:36 PM
Well, my code was too large in parseincomingpackets.
i added parseincominpackets add the end of the
parseincomingpackets, outside the last bracket.
But when i want to add something in there it give's me an error:

symbol can be found. Do u know what do about this.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Echo_ on January 26, 2011, 12:09:00 PM
I have a error, i always have... doens't matter what source i'm using.

This is the error:
Code: [Select]

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M
ain
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.sun.tools.javac.Main.  Program will exit.


Help plz ?

The compiler cannot find the class Main in the package that you defined.(com.sun.tools.javac)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: pobdol on January 27, 2011, 12:42:50 PM
Code: [Select]
javac: file not found: *.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .
Need help..
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: emix89 on January 30, 2011, 02:43:32 PM
no matter what i do i cannot get compiling working keeps saying its not reconized done some meny tuts still nothing any 1 think they cuold help me pm or here  do team viwer or somethink so you can see it better
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Deren22 on February 16, 2011, 04:05:43 PM
I get this error, can someone please help, 

client.java:12916: missing method body, or declare abstract
        public void logout();
                    ^
Note: stream.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: server.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Finished!
Press any key to continue . . .
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: kodak116 on February 19, 2011, 12:47:44 PM
Hi,
okay so I've been trying to get a p server to work for about an hour now, but i can never compile it. The compiler says that i need to download jdk, but I've done that about 5 times. I tryed setting varibles, i even downloaded the thing that does it for you (it didnt work). Please help, i have team viewer.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Dario14 on February 20, 2011, 12:43:15 AM
kodak have you tried changing the jdk version to your jdk? if not maybe i can help thru teamview if you want pm me details
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: nolan2131 on March 13, 2011, 02:59:16 PM
My compiler says can not find specified path. Pm me on how to fix it someone please?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: cowo8 on March 20, 2011, 03:37:01 PM
javac: file not found: src\server\event\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .

help please.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: elatechris on April 02, 2011, 12:56:14 PM
I got an error and I read the one guys reply to the answer but it didnt help me much
class,interface, or enum expected
private int somejunk;
          ^

if I have to add something idk where I  have this for a lot more parts to thanks for any help!
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Ddragonimp on April 02, 2011, 12:58:40 PM
I got an error and I read the one guys reply to the answer but it didnt help me much
class,interface, or enum expected
private int somejunk;
          ^

if I have to add something idk where I  have this for a lot more parts to thanks for any help!


I think you put it above the (as i i think you personaly... did it... not that i want you to do it.)
private int somejunk;
Code: [Select]
public class client extends Player implements Runnable {




Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: elatechris on April 02, 2011, 01:04:39 PM
no I dont think so cause no other private ints are above that
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Ddragonimp on April 02, 2011, 01:05:35 PM
I wanted you to look to see if it was above that line ... not to put it there...

sorry i didnt use periods and comma's


Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: elatechris on April 02, 2011, 01:10:39 PM
I just removed it It was kinda useless thx anyways
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: pk2play on April 12, 2011, 10:31:13 PM
Hey I cannot fix these errors can you please help I have posted in server help mulitple times.
Code: [Select]
.\Server\DialogueHandler.java:7: cannot find symbol
symbol  : class client
location: class server.DialogueHandler
        private client c;
                ^
.\Server\DialogueHandler.java:9: cannot find symbol
symbol  : class Client
location: class server.DialogueHandler
        public DialogueHandler(Client client) {
                               ^
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Scape-JAVA on April 12, 2011, 10:34:03 PM
post your dialogueHandler class.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: pk2play on April 12, 2011, 10:35:15 PM
Code: [Select]
package server;

import server.util.Misc;

public class DialogueHandler {

private client c;

public DialogueHandler(Client client) {
this.c = client;
}

/**
* Handles all talking
* @param dialogue The dialogue you want to use
* @param npcId The npc id that the chat will focus on during the chat
*/
public void sendDialogues(int dialogue, int npcId) {
c.talkingNpc = npcId;
switch(dialogue) {

case 0:
c.talkingNpc = -1;
c.getPA().removeAllWindows();
c.nextChat = 0;
break;
case 1:
sendStatement("You found a hidden tunnel! Do you want to enter it?");
c.dialogueAction = 1;
c.nextChat = 2;
break;
case 2:
sendOption2("Yea! I'm fearless!",  "No way! That looks scary!");
c.dialogueAction = 1;
c.nextChat = 0;
break;
case 3:
sendNpcChat4("Hello!", "My name is Duradel and I am a master of the slayer skill.", "I can assign you a slayer task suitable to your combat level.",
"Would you like a slayer task?", c.talkingNpc, "Duradel");
c.nextChat = 4;
break;
case 5:
sendNpcChat4("Hello adventurer...", "My name is Kolodion, the master of this mage bank.", "Would you like to play a minigame in order ",
"to earn points towards recieving magic related prizes?", c.talkingNpc, "Kolodion");
c.nextChat = 6;
break;
case 6:
sendNpcChat4("The way the game works is as follows...", "You will be teleported to the wilderness,",
"You must kill mages to recieve points,","redeem points with the chamber guardian.", c.talkingNpc, "Kolodion");
c.nextChat = 15;
break;
case 11:
sendNpcChat4("Hello!", "My name is Duradel and I am a master of the slayer skill.", "I can assign you a slayer task suitable to your combat level.",
"Would you like a slayer task?", c.talkingNpc, "Duradel");
c.nextChat = 12;
break;
case 12:
sendOption2("Yes I would like a slayer task.", "No I would not like a slayer task.");
c.dialogueAction = 5;
break;
case 13:
sendNpcChat4("Hello!", "My name is Duradel and I am a master of the slayer skill.", "I see I have already assigned you a task to complete.",
"Would you like me to give you an easier task?", c.talkingNpc, "Duradel");
c.nextChat = 14;
break;
case 14:
sendOption2("Yes I would like an easier task.", "No I would like to keep my task.");
c.dialogueAction = 6;
break;
case 15:
sendOption2("Yes I would like to play", "No, sounds too dangerous for me.");
c.dialogueAction = 7;
break;
case 16:
sendOption2("I would like to fix all my barrows.", "Cancel");
c.dialogueAction = 8;
break;
case 17:
sendOption5("Chillzone", "Catherby", "Mage Bank", "Tz Cave", "More");
c.dialogueAction = 10;
c.dialogueId = 17;
c.teleAction = -1;
break;
case 18:
sendOption5("Training", "Edgeville", "Dragons", "", "More");
c.dialogueAction = 11;
c.dialogueId = 18;
c.teleAction = -1;
break;
case 19:
sendOption5("Dagganoths", "Multipking", "Pest Control", "", "Previous");
c.dialogueAction = 12;
c.dialogueId = 19;
c.teleAction = -1;
break;
/*case 22:
sendNpcChat1("You currently have "+c.pkPoints+" PK points.", c.talkingNpc, "Mazchna");
break;*/
case 23:
sendOption3("44 Portals", "East Dragons", "Mage Bank");
c.dialogueAction = 14;
break;

}
}

/*
* Information Box
*/

public void sendStartInfo(String text, String text1, String text2, String text3, String title) {
c.getPA().sendFrame126(title, 6180);
c.getPA().sendFrame126(text, 6181);
c.getPA().sendFrame126(text1, 6182);
c.getPA().sendFrame126(text2, 6183);
c.getPA().sendFrame126(text3, 6184);
c.getPA().sendFrame164(6179);
}

/*
* Options
*/

private void sendOption(String s, String s1) {
c.getPA().sendFrame126("Select an Option", 2470);
c.getPA().sendFrame126(s, 2471);
c.getPA().sendFrame126(s1, 2472);
c.getPA().sendFrame126("Click here to continue", 2473);
c.getPA().sendFrame164(13758);
}

public void sendOption2(String s, String s1) {
c.getPA().sendFrame126("Select an Option", 2460);
c.getPA().sendFrame126(s, 2461);
c.getPA().sendFrame126(s1, 2462);
c.getPA().sendFrame164(2459);
}

private void sendOption3(String s, String s1, String s2) {
c.getPA().sendFrame126("Select an Option", 2470);
c.getPA().sendFrame126(s, 2471);
c.getPA().sendFrame126(s1, 2472);
c.getPA().sendFrame126(s2, 2473);
c.getPA().sendFrame164(2469);
}

public void sendOption4(String s, String s1, String s2, String s3) {
c.getPA().sendFrame126("Select an Option", 2481);
c.getPA().sendFrame126(s, 2482);
c.getPA().sendFrame126(s1, 2483);
c.getPA().sendFrame126(s2, 2484);
c.getPA().sendFrame126(s3, 2485);
c.getPA().sendFrame164(2480);
}

public void sendOption5(String s, String s1, String s2, String s3, String s4) {
c.getPA().sendFrame126("Select an Option", 2493);
c.getPA().sendFrame126(s, 2494);
c.getPA().sendFrame126(s1, 2495);
c.getPA().sendFrame126(s2, 2496);
c.getPA().sendFrame126(s3, 2497);
c.getPA().sendFrame126(s4, 2498);
c.getPA().sendFrame164(2492);
}

/*
* Statements
*/

private void sendStatement(String s) { // 1 line click here to continue chat box interface
c.getPA().sendFrame126(s, 357);
c.getPA().sendFrame126("Click here to continue", 358);
c.getPA().sendFrame164(356);
}

/*
* Npc Chatting
*/

public void sendNpcChat1(String s, int ChatNpc, String name) {
c.getPA().sendFrame200(4883, 591);
c.getPA().sendFrame126(name, 4884);
c.getPA().sendFrame126(s, 4885);
c.getPA().sendFrame75(ChatNpc, 4883);
c.getPA().sendFrame164(4882);
}

private void sendNpcChat2(String s, String s1, int ChatNpc, String name) {
c.getPA().sendFrame200(4888, 591);
c.getPA().sendFrame126(name, 4889);
c.getPA().sendFrame126(s, 4890);
c.getPA().sendFrame126(s1, 4891);
c.getPA().sendFrame75(ChatNpc, 4888);
c.getPA().sendFrame164(4887);
}

private void sendNpcChat3(String s, String s1, String s2, int ChatNpc, String name) {
c.getPA().sendFrame200(4894, 591);
c.getPA().sendFrame126(name, 4895);
c.getPA().sendFrame126(s, 4896);
c.getPA().sendFrame126(s1, 4897);
c.getPA().sendFrame126(s2, 4898);
c.getPA().sendFrame75(ChatNpc, 4894);
c.getPA().sendFrame164(4893);
}

private void sendNpcChat4(String s, String s1, String s2, String s3, int ChatNpc, String name) {
c.getPA().sendFrame200(4901, 591);
c.getPA().sendFrame126(name, 4902);
c.getPA().sendFrame126(s, 4903);
c.getPA().sendFrame126(s1, 4904);
c.getPA().sendFrame126(s2, 4905);
c.getPA().sendFrame126(s3, 4906);
c.getPA().sendFrame75(ChatNpc, 4901);
c.getPA().sendFrame164(4900);
}

/*
* Player Chating Back
*/

private void sendPlayerChat1(String s) {
c.getPA().sendFrame200(969, 591);
c.getPA().sendFrame126(c.playerName, 970);
c.getPA().sendFrame126(s, 971);
c.getPA().sendFrame185(969);
c.getPA().sendFrame164(968);
}

private void sendPlayerChat2(String s, String s1) {
c.getPA().sendFrame200(974, 591);
c.getPA().sendFrame126(c.playerName, 975);
c.getPA().sendFrame126(s, 976);
c.getPA().sendFrame126(s1, 977);
c.getPA().sendFrame185(974);
c.getPA().sendFrame164(973);
}

private void sendPlayerChat3(String s, String s1, String s2) {
c.getPA().sendFrame200(980, 591);
c.getPA().sendFrame126(c.playerName, 981);
c.getPA().sendFrame126(s, 982);
c.getPA().sendFrame126(s1, 983);
c.getPA().sendFrame126(s2, 984);
c.getPA().sendFrame185(980);
c.getPA().sendFrame164(979);
}

private void sendPlayerChat4(String s, String s1, String s2, String s3) {
c.getPA().sendFrame200(987, 591);
c.getPA().sendFrame126(c.playerName, 988);
c.getPA().sendFrame126(s, 989);
c.getPA().sendFrame126(s1, 990);
c.getPA().sendFrame126(s2, 991);
c.getPA().sendFrame126(s3, 992);
c.getPA().sendFrame185(987);
c.getPA().sendFrame164(986);
}
}
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Saphire` on April 13, 2011, 05:29:39 AM
Java is case sensitive, and it's unable to find the class "client".

Are you sure that "client" exists? or is it "Client"?

Code: [Select]
        private Client c;
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: sloaner on April 27, 2011, 11:04:25 PM
i just started using a PI base and i cant seem to figure this error out. it seems simple, i just cant get it.
here is the error i get on my compiler
Code: [Select]
Jframe.java:84: not a statement
        exception;
        ^
and here is my jframe.java
Code: [Select]
public URL getCodeBase()
    {
        return new URL((new StringBuilder()).append(";).append(server).append

("/cache").toString());
        Exception exception;
exception;
        return super.getCodeBase();
    }
thanks for any sort of help
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: XxJtxX on April 28, 2011, 08:52:36 PM
i just started using a PI base and i cant seem to figure this error out. it seems simple, i just cant get it.
here is the error i get on my compiler
Code: [Select]
Jframe.java:84: not a statement
        exception;
        ^
and here is my jframe.java
Code: [Select]
public URL getCodeBase()
    {
        return new URL((new StringBuilder()).append(";).append(server).append

("/cache").toString());
        Exception exception;
exception;
        return super.getCodeBase();
    }
thanks for any sort of help
Take out the line, exception;.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: sloaner on May 02, 2011, 12:32:14 AM
thanks :)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: why u safee on May 09, 2011, 08:13:00 AM
My compiler isn't running and wondering if anyone could use teamviewer to have a quick look :D inbox me thanks
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Scape-JAVA on May 09, 2011, 06:59:13 PM
Why not make it easier and post it here?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: theman321 on May 12, 2011, 03:32:48 AM
Player.java:862: illegal start of type
        public int maxItemAmount = /*2147000000*/2147000000
                                                 ^   
1 error
. it always says so when im trying to compile. what is the probleM?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: `Discardedx2 on May 12, 2011, 04:53:57 PM
Player.java:862: illegal start of type
        public int maxItemAmount = /*2147000000*/2147000000
                                                 ^   
1 error
. it always says so when im trying to compile. what is the probleM?

lol just use Integer.MAX_VALUE where ever you want 2.147b. anyways, the max value that can be used is not 2147000000, it's actually 2147483647 seeing as an integer is used.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: theman321 on May 13, 2011, 08:31:47 AM
Player.java:862: illegal start of type
        public int maxItemAmount = /*2147000000*/2147000000
                                                 ^   
1 error
. it always says so when im trying to compile. what is the probleM?

lol just use Integer.MAX_VALUE where ever you want 2.147b. anyways, the max value that can be used is not 2147000000, it's actually 2147483647 seeing as an integer is used.
Where should i put that integer.maxvalue? im so nooby at this
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: DeathsChaos9 on May 15, 2011, 02:47:34 PM
Code: Java
  1. publicint maxItemAmount =Integer.MAX_VALUE;
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: auroth on May 20, 2011, 05:54:21 PM
Hey You didn't post "Illegal characters". There was a word in between "Illegal And Characters"  but i cant remember wat it is so yeah plz help me i cant edit my rsps at all until ive fixed this error plz help!

Whats your error?

I really don't remember now, thanks for helping though or atleast trying to, I reset my computer on widows xp and installed 4 different versions of jdk and it worked! so thanks again for trying to help  :D ;D :D
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: frenkerscape on May 23, 2011, 08:20:33 AM
can someone help me with this error

(http://i55.tinypic.com/2cii9fn.jpg)
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: ganter on May 24, 2011, 10:34:33 PM
Whats [email protected] off
@TITLE PwnCity client compiler
if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
:compile
for /D %%x in ("%~1jdk*") do (set p="jdk1.6.0\bin\javac.exe")
if defined p (%p% -cp . *.java)
if defined p (goto end)
:error
echo You do not have Java installed. Please download it at the site that is about to load.
:end
echo Finished!
pause
exit
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Marine5287 on May 24, 2011, 10:38:57 PM
Whats [email protected] off
@TITLE PwnCity client compiler
if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
:compile
for /D %%x in ("%~1jdk*") do (set p="jdk1.6.0\bin\javac.exe")
if defined p (%p% -cp . *.java)
if defined p (goto end)
:error
echo You do not have Java installed. Please download it at the site that is about to load.
:end
echo Finished!
pause
exit

You're missing some things. Try this:
Code: Text
  1. @echo off
  2. color 0a
  3. title Compiler
  4. if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
  5. :compile
  6. for /D %%x in ("%~1jdk*") do (set p="%%~x\bin\javac.exe")
  7. if defined p (%p% -cp . *.java)
  8. if defined p (goto end)
  9. :error
  10. echo You do not have Java installed. Please download it at the site that is about to load.
  11. "%programfiles%\Internet Explorer\iexplore.exe" http://www.oracle.com/technetwork/java/javase/downloads/index.html
  12. :end
  13. echo You have sucsessfully compiled
  14. pause
  15. exit
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: maxw30 on May 26, 2011, 02:10:46 AM
Hey moparscape,
Does anyone know what this error is and how to fix it because i would give you anything if you can fix this and ive got teamviewer if needed please get back to me!
http://s804.photobucket.com/user/t0xiic/library/_m0dzz/?action=view&current=Untitled.png
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Marine5287 on June 04, 2011, 10:46:26 PM
You should add StringIndexOutOfBoundsException in the exeption area. This thread has helped me ever since I was on here, nice

job.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: Thunderheart221 on June 17, 2011, 09:30:37 AM
100 errors: How do I figure out where the extra bracket is, I know it's in client.java from what the compiler says, but I cannot figure out where the extra bracket is in there.
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: l0lc0pt3r on June 26, 2011, 04:11:46 PM
error:
Code: Java
  1. Animation.java:24:'try' without 'catch' or 'finally'
  2.                         try{
  3.                         ^
  4. 1 error
  5. Press any key to continue . . .
  6.  
where that error is:
Code: Java
  1.  
  2.         publicstaticvoid unpackConfig(StreamLoader streamLoader){
  3.                 for(int j =0; j < FrameStart.length; j++)
  4.                         FrameStart[j]=0;
  5.                 Stream stream =new Stream(streamLoader.getDataForName("seq.dat"));
  6.                 int length = stream.readUnsignedWord()+3299;
  7.                 if(anims ==null)
  8.                         anims =new Animation[length];
  9.                 for(int j =0; j < length; j++){
  10.                         if(anims[j]==null)
  11.                                 anims[j]=new Animation();
  12.                         if(j <3997){
  13.                                 anims[j].readValues(stream);
  14.                         }else{
  15.                                 setAnimBase(j);
  16.                         }
  17.                         try{
  18. // Skill capes begin
  19. if(j ==4960){  //Attack cape
  20. int file =1293;
  21. if(FrameStart[file]<1)
  22. Class36.methodCustomAnimations(false, file);
  23. int[] frames ={0,11,22,33,39,40,41,42,43,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,0};
  24. int[] delays ={4,4,4,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,4,4,4,4,3,3,3,4,5,5,0};
  25. anims[j].anInt352= frames.length-1;
  26. anims[j].anIntArray353=newint[frames.length-1];
  27. anims[j].anIntArray354=newint[frames.length-1];
  28. anims[j].anIntArray355=newint[frames.length-1];
  29. for(int i2 =0; i2 < frames.length-1; i2++){
  30. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  31. anims[j].anIntArray354[i2]=-1;
  32. anims[j].anIntArray355[i2]= delays[i2];
  33. }
  34. }
  35. if(j ==4959){  //Attack cape (EMOTE)
  36. int file =1290;
  37. if(FrameStart[file]<1)
  38. Class36.methodCustomAnimations2(false, file);
  39. int[] frames ={49,60,71,82,88,89,90,91,92,50,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,72,73,74,75,76,77,78,79,80,81,83,84,85,86,87,0};
  40. int[] delays ={4,4,4,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,4,4,4,4,3,3,3,4,5,5,0};
  41. anims[j].anInt352= frames.length-1;
  42. anims[j].anIntArray353=newint[frames.length-1];
  43. anims[j].anIntArray354=newint[frames.length-1];
  44. anims[j].anIntArray355=newint[frames.length-1];
  45. for(int i2 =0; i2 < frames.length-1; i2++){
  46. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  47. anims[j].anIntArray354[i2]=-1;
  48. anims[j].anIntArray355[i2]= delays[i2];
  49. }
  50. }
  51.  
  52. if(j ==4982){  //Strength cape
  53. int file =1311;
  54. if(FrameStart[file]<1)
  55. Class36.methodCustomAnimations(false, file);
  56. int[] frames ={0,11,22,33,44,55,66,77,88,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,73,74,73,74,73,74,73,74,75,76,78,79,80,81,82,83,84,85,86,87,89,0};
  57. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,19,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  58. anims[j].anInt352= frames.length-1;
  59. anims[j].anIntArray353=newint[frames.length-1];
  60. anims[j].anIntArray354=newint[frames.length-1];
  61. anims[j].anIntArray355=newint[frames.length-1];
  62. for(int i2 =0; i2 < frames.length-1; i2++){
  63. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  64. anims[j].anIntArray354[i2]=-1;
  65. anims[j].anIntArray355[i2]= delays[i2];
  66. }
  67. }
  68. if(j ==4981){  //Strength cape (EMOTE)
  69. int file =1290;
  70. if(FrameStart[file]<1)
  71. Class36.methodCustomAnimations2(false, file);
  72. int[] frames ={1471,1482,1493,1504,1515,1526,1537,1548,1559,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1538,1539,1540,1541,1542,1543,1544,1545,1544,1545,1544,1545,1544,1545,1544,1545,1546,1547,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1560,1561,1562,1563,1562,1563,1562,1563,1564,1565,1566,1567,1568,0};
  73. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,19,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  74. anims[j].anInt352= frames.length-1;
  75. anims[j].anIntArray353=newint[frames.length-1];
  76. anims[j].anIntArray354=newint[frames.length-1];
  77. anims[j].anIntArray355=newint[frames.length-1];
  78. for(int i2 =0; i2 < frames.length-1; i2++){
  79. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  80. anims[j].anIntArray354[i2]=-1;
  81. anims[j].anIntArray355[i2]= delays[i2];
  82. }
  83. }
  84. if(j ==4962){  //Defence cape
  85. int file =1297;
  86. if(FrameStart[file]<1)
  87. Class36.methodCustomAnimations(false, file);
  88. int[] frames ={0,12,23,34,38,39,40,41,42,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,35,36,37,0};
  89. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  90. anims[j].anInt352= frames.length-1;
  91. anims[j].anIntArray353=newint[frames.length-1];
  92. anims[j].anIntArray354=newint[frames.length-1];
  93. anims[j].anIntArray355=newint[frames.length-1];
  94. for(int i2 =0; i2 < frames.length-1; i2++){
  95. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  96. anims[j].anIntArray354[i2]=-1;
  97. anims[j].anIntArray355[i2]= delays[i2];
  98. }
  99. }
  100. if(j ==4961){  //Defence cape (EMOTE)
  101. int file =1290;
  102. if(FrameStart[file]<1)
  103. Class36.methodCustomAnimations2(false, file);
  104. int[] frames ={410,421,432,443,452,453,454,455,456,411,412,413,414,415,416,417,418,419,420,422,423,424,425,426,427,428,429,430,431,433,434,435,436,437,438,439,440,441,440,439,440,441,440,439,440,441,442,444,445,446,447,448,449,450,451,0};
  105. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  106. anims[j].anInt352= frames.length-1;
  107. anims[j].anIntArray353=newint[frames.length-1];
  108. anims[j].anIntArray354=newint[frames.length-1];
  109. anims[j].anIntArray355=newint[frames.length-1];
  110. for(int i2 =0; i2 < frames.length-1; i2++){
  111. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  112. anims[j].anIntArray354[i2]=-1;
  113. anims[j].anIntArray355[i2]= delays[i2];
  114. }
  115. }
  116. if(j ==4974){  //Ranged cape
  117. int file =1308;
  118. if(FrameStart[file]<1)
  119. Class36.methodCustomAnimations(false, file);
  120. int[] frames ={0,11,22,33,44,55,57,58,59,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,54,56,0};
  121. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  122. anims[j].anInt352= frames.length-1;
  123. anims[j].anIntArray353=newint[frames.length-1];
  124. anims[j].anIntArray354=newint[frames.length-1];
  125. anims[j].anIntArray355=newint[frames.length-1];
  126. for(int i2 =0; i2 < frames.length-1; i2++){
  127. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  128. anims[j].anIntArray354[i2]=-1;
  129. anims[j].anIntArray355[i2]= delays[i2];
  130. }
  131. }
  132.  
  133. if(j ==4973){  //Ranged cape (EMOTE)
  134. int file =1290;
  135. if(FrameStart[file]<1)
  136. Class36.methodCustomAnimations2(false, file);
  137. int[] frames ={1361,1372,1383,1394,1405,1416,1420,1421,1422,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1417,1418,1419,0};
  138. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  139. anims[j].anInt352= frames.length-1;
  140. anims[j].anIntArray353=newint[frames.length-1];
  141. anims[j].anIntArray354=newint[frames.length-1];
  142. anims[j].anIntArray355=newint[frames.length-1];
  143. for(int i2 =0; i2 < frames.length-1; i2++){
  144. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  145. anims[j].anIntArray354[i2]=-1;
  146. anims[j].anIntArray355[i2]= delays[i2];
  147. }
  148. }
  149. if(j ==4980){  //Prayer cape
  150. int file =1306;
  151. if(FrameStart[file]<1)
  152. Class36.methodCustomAnimations(false, file);
  153. int[] frames ={0,11,22,33,44,54,55,56,57,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,0};
  154. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  155. anims[j].anInt352= frames.length-1;
  156. anims[j].anIntArray353=newint[frames.length-1];
  157. anims[j].anIntArray354=newint[frames.length-1];
  158. anims[j].anIntArray355=newint[frames.length-1];
  159. for(int i2 =0; i2 < frames.length-1; i2++){
  160. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  161. anims[j].anIntArray354[i2]=-1;
  162. anims[j].anIntArray355[i2]= delays[i2];
  163. }
  164. }
  165. if(j ==4979){  //Prayer cape (EMOTE)
  166. int file =1290;
  167. if(FrameStart[file]<1)
  168. Class36.methodCustomAnimations2(false, file);
  169. int[] frames ={997,1314,1325,1336,1347,1357,1358,1359,1360,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1348,1349,1350,1351,1352,1353,1354,1355,1356,0};
  170. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  171. anims[j].anInt352= frames.length-1;
  172. anims[j].anIntArray353=newint[frames.length-1];
  173. anims[j].anIntArray354=newint[frames.length-1];
  174. anims[j].anIntArray355=newint[frames.length-1];
  175. for(int i2 =0; i2 < frames.length-1; i2++){
  176. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  177. anims[j].anIntArray354[i2]=-1;
  178. anims[j].anIntArray355[i2]= delays[i2];
  179. }
  180. }
  181.  
  182. }
  183. }
  184. }
  185.  
  186.  

can anyone help?
Title: Re: Common Compiler Errors
Post by: Puffscape on July 07, 2011, 02:59:49 PM
class OneHunderedError {
   public static void main(String[] args) {
      System.out.println("This is an example of 100 errors!");
}
No, that's an example of an idiot not putting a bracket there. That would not throw 100 errors as there isn't any code being fudgeed up and in the wrong scope in the class it would probably just say someone along the lines of "Reached the end of the file while parsing".
What if its the first time he code's and he has no idea he has to put a bracket? what if he doesn't even know wtf a bracket is?
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: The Wanderer on July 07, 2011, 11:57:15 PM
error:
Code: Java
  1. Animation.java:24:'try' without 'catch' or 'finally'
  2.                         try{
  3.                         ^
  4. 1 error
  5. Press any key to continue . . .
  6.  
where that error is:
Code: Java
  1.  
  2.         publicstaticvoid unpackConfig(StreamLoader streamLoader){
  3.                 for(int j =0; j < FrameStart.length; j++)
  4.                         FrameStart[j]=0;
  5.                 Stream stream =new Stream(streamLoader.getDataForName("seq.dat"));
  6.                 int length = stream.readUnsignedWord()+3299;
  7.                 if(anims ==null)
  8.                         anims =new Animation[length];
  9.                 for(int j =0; j < length; j++){
  10.                         if(anims[j]==null)
  11.                                 anims[j]=new Animation();
  12.                         if(j <3997){
  13.                                 anims[j].readValues(stream);
  14.                         }else{
  15.                                 setAnimBase(j);
  16.                         }
  17.                         try{
  18. // Skill capes begin
  19. if(j ==4960){  //Attack cape
  20. int file =1293;
  21. if(FrameStart[file]<1)
  22. Class36.methodCustomAnimations(false, file);
  23. int[] frames ={0,11,22,33,39,40,41,42,43,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,0};
  24. int[] delays ={4,4,4,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,4,4,4,4,3,3,3,4,5,5,0};
  25. anims[j].anInt352= frames.length-1;
  26. anims[j].anIntArray353=newint[frames.length-1];
  27. anims[j].anIntArray354=newint[frames.length-1];
  28. anims[j].anIntArray355=newint[frames.length-1];
  29. for(int i2 =0; i2 < frames.length-1; i2++){
  30. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  31. anims[j].anIntArray354[i2]=-1;
  32. anims[j].anIntArray355[i2]= delays[i2];
  33. }
  34. }
  35. if(j ==4959){  //Attack cape (EMOTE)
  36. int file =1290;
  37. if(FrameStart[file]<1)
  38. Class36.methodCustomAnimations2(false, file);
  39. int[] frames ={49,60,71,82,88,89,90,91,92,50,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,72,73,74,75,76,77,78,79,80,81,83,84,85,86,87,0};
  40. int[] delays ={4,4,4,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,4,4,4,4,3,3,3,4,5,5,0};
  41. anims[j].anInt352= frames.length-1;
  42. anims[j].anIntArray353=newint[frames.length-1];
  43. anims[j].anIntArray354=newint[frames.length-1];
  44. anims[j].anIntArray355=newint[frames.length-1];
  45. for(int i2 =0; i2 < frames.length-1; i2++){
  46. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  47. anims[j].anIntArray354[i2]=-1;
  48. anims[j].anIntArray355[i2]= delays[i2];
  49. }
  50. }
  51.  
  52. if(j ==4982){  //Strength cape
  53. int file =1311;
  54. if(FrameStart[file]<1)
  55. Class36.methodCustomAnimations(false, file);
  56. int[] frames ={0,11,22,33,44,55,66,77,88,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,73,74,73,74,73,74,73,74,75,76,78,79,80,81,82,83,84,85,86,87,89,0};
  57. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,19,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  58. anims[j].anInt352= frames.length-1;
  59. anims[j].anIntArray353=newint[frames.length-1];
  60. anims[j].anIntArray354=newint[frames.length-1];
  61. anims[j].anIntArray355=newint[frames.length-1];
  62. for(int i2 =0; i2 < frames.length-1; i2++){
  63. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  64. anims[j].anIntArray354[i2]=-1;
  65. anims[j].anIntArray355[i2]= delays[i2];
  66. }
  67. }
  68. if(j ==4981){  //Strength cape (EMOTE)
  69. int file =1290;
  70. if(FrameStart[file]<1)
  71. Class36.methodCustomAnimations2(false, file);
  72. int[] frames ={1471,1482,1493,1504,1515,1526,1537,1548,1559,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1538,1539,1540,1541,1542,1543,1544,1545,1544,1545,1544,1545,1544,1545,1544,1545,1546,1547,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1560,1561,1562,1563,1562,1563,1562,1563,1564,1565,1566,1567,1568,0};
  73. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,10,4,4,4,10,4,4,4,4,4,19,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  74. anims[j].anInt352= frames.length-1;
  75. anims[j].anIntArray353=newint[frames.length-1];
  76. anims[j].anIntArray354=newint[frames.length-1];
  77. anims[j].anIntArray355=newint[frames.length-1];
  78. for(int i2 =0; i2 < frames.length-1; i2++){
  79. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  80. anims[j].anIntArray354[i2]=-1;
  81. anims[j].anIntArray355[i2]= delays[i2];
  82. }
  83. }
  84. if(j ==4962){  //Defence cape
  85. int file =1297;
  86. if(FrameStart[file]<1)
  87. Class36.methodCustomAnimations(false, file);
  88. int[] frames ={0,12,23,34,38,39,40,41,42,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,35,36,37,0};
  89. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  90. anims[j].anInt352= frames.length-1;
  91. anims[j].anIntArray353=newint[frames.length-1];
  92. anims[j].anIntArray354=newint[frames.length-1];
  93. anims[j].anIntArray355=newint[frames.length-1];
  94. for(int i2 =0; i2 < frames.length-1; i2++){
  95. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  96. anims[j].anIntArray354[i2]=-1;
  97. anims[j].anIntArray355[i2]= delays[i2];
  98. }
  99. }
  100. if(j ==4961){  //Defence cape (EMOTE)
  101. int file =1290;
  102. if(FrameStart[file]<1)
  103. Class36.methodCustomAnimations2(false, file);
  104. int[] frames ={410,421,432,443,452,453,454,455,456,411,412,413,414,415,416,417,418,419,420,422,423,424,425,426,427,428,429,430,431,433,434,435,436,437,438,439,440,441,440,439,440,441,440,439,440,441,442,444,445,446,447,448,449,450,451,0};
  105. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  106. anims[j].anInt352= frames.length-1;
  107. anims[j].anIntArray353=newint[frames.length-1];
  108. anims[j].anIntArray354=newint[frames.length-1];
  109. anims[j].anIntArray355=newint[frames.length-1];
  110. for(int i2 =0; i2 < frames.length-1; i2++){
  111. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  112. anims[j].anIntArray354[i2]=-1;
  113. anims[j].anIntArray355[i2]= delays[i2];
  114. }
  115. }
  116. if(j ==4974){  //Ranged cape
  117. int file =1308;
  118. if(FrameStart[file]<1)
  119. Class36.methodCustomAnimations(false, file);
  120. int[] frames ={0,11,22,33,44,55,57,58,59,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,54,56,0};
  121. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  122. anims[j].anInt352= frames.length-1;
  123. anims[j].anIntArray353=newint[frames.length-1];
  124. anims[j].anIntArray354=newint[frames.length-1];
  125. anims[j].anIntArray355=newint[frames.length-1];
  126. for(int i2 =0; i2 < frames.length-1; i2++){
  127. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  128. anims[j].anIntArray354[i2]=-1;
  129. anims[j].anIntArray355[i2]= delays[i2];
  130. }
  131. }
  132.  
  133. if(j ==4973){  //Ranged cape (EMOTE)
  134. int file =1290;
  135. if(FrameStart[file]<1)
  136. Class36.methodCustomAnimations2(false, file);
  137. int[] frames ={1361,1372,1383,1394,1405,1416,1420,1421,1422,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1417,1418,1419,0};
  138. int[] delays ={4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0};
  139. anims[j].anInt352= frames.length-1;
  140. anims[j].anIntArray353=newint[frames.length-1];
  141. anims[j].anIntArray354=newint[frames.length-1];
  142. anims[j].anIntArray355=newint[frames.length-1];
  143. for(int i2 =0; i2 < frames.length-1; i2++){
  144. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  145. anims[j].anIntArray354[i2]=-1;
  146. anims[j].anIntArray355[i2]= delays[i2];
  147. }
  148. }
  149. if(j ==4980){  //Prayer cape
  150. int file =1306;
  151. if(FrameStart[file]<1)
  152. Class36.methodCustomAnimations(false, file);
  153. int[] frames ={0,11,22,33,44,54,55,56,57,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,0};
  154. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  155. anims[j].anInt352= frames.length-1;
  156. anims[j].anIntArray353=newint[frames.length-1];
  157. anims[j].anIntArray354=newint[frames.length-1];
  158. anims[j].anIntArray355=newint[frames.length-1];
  159. for(int i2 =0; i2 < frames.length-1; i2++){
  160. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  161. anims[j].anIntArray354[i2]=-1;
  162. anims[j].anIntArray355[i2]= delays[i2];
  163. }
  164. }
  165. if(j ==4979){  //Prayer cape (EMOTE)
  166. int file =1290;
  167. if(FrameStart[file]<1)
  168. Class36.methodCustomAnimations2(false, file);
  169. int[] frames ={997,1314,1325,1336,1347,1357,1358,1359,1360,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1348,1349,1350,1351,1352,1353,1354,1355,1356,0};
  170. int[] delays ={5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0};
  171. anims[j].anInt352= frames.length-1;
  172. anims[j].anIntArray353=newint[frames.length-1];
  173. anims[j].anIntArray354=newint[frames.length-1];
  174. anims[j].anIntArray355=newint[frames.length-1];
  175. for(int i2 =0; i2 < frames.length-1; i2++){
  176. anims[j].anIntArray353[i2]= frames[i2]+FrameStart[file];
  177. anims[j].anIntArray354[i2]=-1;
  178. anims[j].anIntArray355[i2]= delays[i2];
  179. }
  180. }
  181.  
  182. }
  183. }
  184. }
  185.  
  186.  

can anyone help?

You need to add a catch.
Code: Java
  1. publicvoid myMethod()
  2. {
  3.       try{
  4.             // do stuff that might throw an IOException
  5.       }catch(IOException exception){
  6.             System.error.println("Oops, caught an exception.");
  7.       }
  8. }
Title: Re: Common Compiler Errors and Runtime Exceptions
Post by: epicmodz on July 22, 2011, 09:12:55 AM
i dont understand it with everything i am netherlands and i dont understand nothing i got mising symbol and 100errors always how to fix it
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: lamchopian on July 26, 2011, 10:09:28 PM
when i copmpile my server i get ((the sytem cannot find the file specified)) then it says ((compiling loginserver)) then ((the sytem cannot find the file specified))((X5)) then it says complete any help would be nice cause it doesnt even compile my 562
Title: [PI] Client Compiling Error [PI]
Post by: Mage mad nes on July 28, 2011, 02:51:04 PM
Hey anyone know this issue??
Alright so i got my client.jar from webclient and decompiled client.class for client.java, then i added a compiler to my webclient.. Now when i compile the files i get this error:

Code: [Select]
client.java:8986: illegal start of expression
         myPlayer = this.playerArray[this.myPlayerIndex] = = new Player();

1 error
Press any key to continue . . .

Picture:
(http://i971.photobucket.com/albums/ae191/venscapepics/compilingissue1.png)

Here is where the line of text is in client.java:
Code: [Select]
}
        myPlayer = this.playerArray[this.myPlayerIndex] = = new Player();
        this.aClass19_1013.removeAll();
        this.aClass19_1056.removeAll();
        for (int l2 = 0; l2 < 4; l2++)
        {
          for (int i3 = 0; i3 < 104; i3++)
          {
            for (int k3 = 0; k3 < 104; k3++) {
              this.groundArray[l2][i3][k3] = null;
            }

As you can see the  2nd '=' sign in the equation is pointed at with '^' .. I tried deleting that and i got 98-99 errors. If anyone knows the issue please please help and let me know asap! Thanks a ton! - Mage mad nes
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on July 28, 2011, 03:02:55 PM
Try deleting the space between the 2 =.  Could be wrong.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Mage mad nes on July 28, 2011, 03:14:47 PM
tried that and got 99 errors.. :(
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: I am beast on July 29, 2011, 11:24:43 AM
Here is my item command:
Code: [Select]
if (playerCommand.startsWith("item") ||

playerCommand.startsWith("pickup")) {                       
                                                if (c.inWild()) {       

                 
                                                c.sendMessage("You

can't spawn items in the Wilderness!");
                                                return;                 

       
                                                }                       

         
                                                       try {           

                   
                                                       String[] args =

playerCommand.split(" ");                               
                                                       if (args.length

== 3) {                               
                                                       int newItemID =

Integer.parseInt(args[1]);                               
                                                       int

newItemAmount = Integer.parseInt(args[2]);                             

                 
                                                       int

restrictedItems[] = {4151};                                             

   
                                                       for (int i :

restrictedItems) {                                               
                                                       if (i ==

newItemID) {                                                       
                                                               if

(c.playerRights != 3 && c.playerRights != 2) {                         

                                     
                                                                       

c.sendMessage("You can't spawn this item!");                           

                           
                                                               return; 

                                                     
                                                               }       

                                               
                                                       }               

                       
                                               }                       

       
                           }
}
}


Here is my compiler error:
Code: [Select]
src\server\model\players\packets\Commands.java:596: 'try' without 'catch' or 'fi
nally'
                                                       try {

                                                       ^
1 error
Press any key to continue . . .
Title: Re: Common Compiler Errors
Post by: ZioBotic on August 01, 2011, 03:11:31 PM
Can you plz help me with this error, i downloaded tokkulscape 508 yesterday, but if i run the server, this happen:

Quote
Exception in thread "main" java.lang.NoClassDefFoundError: Bulby/Server
Caused by: java.lang.ClassNotFoundException: Bulby.Server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Bulby/Server.  Program will exit.
Press any key to continue. . .
Plz, help me, this is my first private server, keep it very simple plz
that is easy - just check the npc files....
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: stooks on August 06, 2011, 06:06:27 PM
When i try to compile my server...it's new and it says this

(http://i1195.photobucket.com/albums/aa386/xSTOOKSx/compileerror.png)

HELP PLEASE???
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on August 06, 2011, 06:12:09 PM
When i try to compile my server...it's new and it says this

(http://i1195.photobucket.com/albums/aa386/xSTOOKSx/compileerror.png)

HELP PLEASE???
That's good.. means it compiled successfully..
Title: Re: Common Compiler Errors
Post by: gods of world on August 07, 2011, 06:23:27 AM
lol my servwer is fudgeed up i  cant get it 2 work lol :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :P
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Faderjaxs on August 07, 2011, 01:00:17 PM
Exception in thread "main" java.lang.UnsupportedClassVersionError: server : Unsu
pported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: server.  Program will exit.
Press any key to continue . . .

Any ideas?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: The Wanderer on August 09, 2011, 01:31:59 AM
Google does wonders.
http://geekexplains.blogspot.com/2009/01/javalangunsupportedclassversionerror.html
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: r0v3rT3N on August 09, 2011, 12:39:35 PM
Here is the code I used I'm trying to make a Skilling Shop.

In Client.java I put: 

Code: [Select]
} else if (NPCID == 594) {
PutNPCCords = true;
WanneShop = 43; // Skilling Supplies

In Shop.cfg I put:

Code: [Select]
shop = 43   Skilling_Supplies1123471000946100017551000134910001359 10001267100012751000227100014361000173310003031000311 1000301 1000174510001623 1000162110001619 1000161710001631 1000

In Autospawn.cfg I put:

Code: [Select]
spawn = 5943029 3379000001

The error I get from compile is:

 

The error I get from run is:



Any suggestions would help!
Thanks  :)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: The Wanderer on August 11, 2011, 12:27:44 PM
3029 is the wrong number format. Make sure you entered it correctly. Also it can't find the variable PutNPCCords. Make sure you spelled it right and use the right case, since Java is case-sensitive. Autospawn might not be tabbed correctly.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: adrian2 on August 14, 2011, 06:27:38 PM
This is the code

if (myPrivilege = 2 || server.equals ("domesticpvp.no-ip.org"); {

If you could please help me i'd appreciate it. Thanks


(Click on Picture to enlarge)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on August 14, 2011, 09:02:53 PM
This is the code

if (myPrivilege = 2 || server.equals ("domesticpvp.no-ip.org"); {

If you could please help me i'd appreciate it. Thanks


(Click on Picture to enlarge)
Change it to
Code: Java
  1. if(myPrivilege =2|| server.equals("domesticpvp.no-ip.org"){
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: adrian2 on August 14, 2011, 09:12:21 PM
This is the code

if (myPrivilege = 2 || server.equals ("domesticpvp.no-ip.org"); {

If you could please help me i'd appreciate it. Thanks


(Click on Picture to enlarge)
Change it to
Code: Java
  1. if(myPrivilege =2|| server.equals("domesticpvp.no-ip.org"){


Superman, it's still saying the same thing ')' is expected

Do you know what to do?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on August 14, 2011, 09:15:36 PM
This is the code

if (myPrivilege = 2 || server.equals ("domesticpvp.no-ip.org"); {

If you could please help me i'd appreciate it. Thanks


(Click on Picture to enlarge)
Change it to
Code: Java
  1. if(myPrivilege =2|| server.equals("domesticpvp.no-ip.org"){


Superman, it's still saying the same thing ')' is expected

Do you know what to do?
Ooh my bad..
Code: Java
  1. if(myPrivilege =2|| server.equals("domesticpvp.no-ip.org")){
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: adrian2 on August 14, 2011, 09:25:47 PM

Once i took out the ';' it gave me 95 errors, and before i only had 1. I think its when i add 2 ')' at the end.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Fridder on September 12, 2011, 08:23:49 PM
Hi. I'm using Ubuntu 11.04 OS and completely removed Windows because it's slow.
I'm trying to compile my server but when I do, this is what happens:
(http://oi56.tinypic.com/1zvzrs4.jpg)

Here's my Compile.bat code.

Code: [Select]
@echo off
"/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe" -classpath deps/log4j-1.2.15.jar;deps/jython.jar;deps/xstream.jar;deps/mina.jar;deps/mysql.jar;deps/poi.jar;deps/slf4j.jar;deps/slf4j-nop.jar -d bin src\server\event\*.java src\server\model\items\*.java src\server\model\minigames\*.java src\server\model\npcs\*.java src\server\model\objects\*.java src\server\model\players\*.java src\server\model\players\skills\*.java src\server\model\players\packets\*.java src\server\model\shops\*.java src\server\net\*.java src\server\task\*.java src\server\util\*.java src\server\world\*.java src\server\util\log\*.java src\server\*.java src\server\world\map\*.java
pause
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Camballer on September 12, 2011, 08:50:08 PM
THANKS!  :)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on September 12, 2011, 08:50:55 PM
Hi. I'm using Ubuntu 11.04 OS and completely removed Windows because it's slow.
I'm trying to compile my server but when I do, this is what happens:
(http://oi56.tinypic.com/1zvzrs4.jpg)

Here's my Compile.bat code.

Code: [Select]
@echo off
"/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe" -classpath deps/log4j-1.2.15.jar;deps/jython.jar;deps/xstream.jar;deps/mina.jar;deps/mysql.jar;deps/poi.jar;deps/slf4j.jar;deps/slf4j-nop.jar -d bin src\server\event\*.java src\server\model\items\*.java src\server\model\minigames\*.java src\server\model\npcs\*.java src\server\model\objects\*.java src\server\model\players\*.java src\server\model\players\skills\*.java src\server\model\players\packets\*.java src\server\model\shops\*.java src\server\net\*.java src\server\task\*.java src\server\util\*.java src\server\world\*.java src\server\util\log\*.java src\server\*.java src\server\world\map\*.java
pause
"/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe"
:x
change it to just java
:eek:?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Fridder on September 12, 2011, 09:40:39 PM
Hi. I'm using Ubuntu 11.04 OS and completely removed Windows because it's slow.
I'm trying to compile my server but when I do, this is what happens:
(http://oi56.tinypic.com/1zvzrs4.jpg)

Here's my Compile.bat code.

Code: [Select]
@echo off
"/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe" -classpath deps/log4j-1.2.15.jar;deps/jython.jar;deps/xstream.jar;deps/mina.jar;deps/mysql.jar;deps/poi.jar;deps/slf4j.jar;deps/slf4j-nop.jar -d bin src\server\event\*.java src\server\model\items\*.java src\server\model\minigames\*.java src\server\model\npcs\*.java src\server\model\objects\*.java src\server\model\players\*.java src\server\model\players\skills\*.java src\server\model\players\packets\*.java src\server\model\shops\*.java src\server\net\*.java src\server\task\*.java src\server\util\*.java src\server\world\*.java src\server\util\log\*.java src\server\*.java src\server\world\map\*.java
pause
"/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe"
:x
change it to just java
:eek:?

I can run my server perfectly fine the way the "/home/dj/.wine/dosdevices/c:/Program Files/Java/jdk1.6.0_27/bin/java.exe" line goes.
I can compile another server of mine, but this one source is being a pain in the ass. :L
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: kile 392 on September 28, 2011, 07:42:47 PM
Well, for all you noobs out there who say "BUT I SET IT TO MY JDK [email protected][email protected]#@#@[email protected]#@!#"
YOU HAVE TO DOWNLOAD JDK, NOT JUST JAVA!!!!!!!!! So if you think you have the path right, but it says path not specified YOU DONT HAVE JDK, YOU JUST DOWNLOADED THE NEWEST VERSION OF JAVA!!!!
Heres the link for jdk.
http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
I just figure this out, because i got back into servers, but im on a new computer and tottally forgot about having to download jdk.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: tantan121 on November 16, 2011, 07:00:11 PM
what do i put in the compiler so it will actually compile i downloaded java so what do i put in compiler?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: bend over and spell run on November 21, 2011, 06:16:19 PM
Thanks for this bro :D
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Beniooo on November 23, 2011, 02:05:16 AM
Hi i tyin to compile UseItem.java
but compiler says 21 errors first error is packege blah blah blah does not exist
second package blah blah does not exist
And errors from 3 to 21 says cannot find symbol
Please help immadielty
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: jdog39 on December 09, 2011, 11:02:26 PM
Please help i dont understand

client.java:11740: ';' expected
                aClass30_Sub2_Sub1_Sub1_1292.method348(i1 - 73, 16083, l1 - 20);



i looked around it site says there is a missing ; but i put on on the end so wtf...
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Jazzelhawk on December 20, 2011, 03:22:23 PM
Could someone help me understand this please?

Code: [Select]
Compiling net/com/codeusa/Engine.java
src\net\com\codeusa\Engine.java:75: cannot access net.com.codeusa.ShopHandler
bad class file: src\net\com\codeusa\ShopHandler.java
file does not contain class net.com.codeusa.ShopHandler
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
public static ShopHandler shopHandler = new ShopHandler();
              ^
Press any key to continue . .
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: I Gone Gotch on December 29, 2011, 09:25:47 PM


Please help me, view my thread, compiler error, pictures included for easy understanding for people who know this. //facepalm  :confused: :confused:
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Vexillum on January 26, 2012, 04:35:52 PM
This is an error I got:

Quote
'javac' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

Sorry if this is a noobish question, but it has been so long and I didn't see it listed.

Yes, I have JDK.
Yes, I attempted to set the Environmental Variables (Idk if that is the prob).
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: dropthebeat on February 02, 2012, 10:18:21 PM


and i keep getting javac is not recognized as a internal/external command o.o im running 7u2, windows vista, PI source any help would be great also having trouble for people connecting with the client

my server compiler has this

Code: [Select]


@echo off
COLOR C
ECHO Compiling - Project Insanity
ECHO Please wait patiently...
TITLE Compile - Server
javac -classpath deps/log4j-1.2.15.jar;deps/jython.jar;deps/xstream.jar;deps/mina.jar;deps/mysql.jar;deps/poi.jar;deps/slf4j.jar;deps/slf4j-nop.jar -d bin src\server\event\*.java src\server\model\items\*.java src\server\model\minigames\*.java src\server\model\npcs\*.java src\server\model\objects\*.java src\server\model\players\*.java src\server\model\players\skills\*.java src\server\model\players\packets\*.java src\server\model\shops\*.java src\server\net\*.java src\server\task\*.java src\server\util\*.java src\server\world\*.java src\server\util\log\*.java src\server\*.java src\server\world\map\*.java
pause

Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: someguy212 on February 05, 2012, 11:25:50 PM
Code: [Select]
Exception in thread "main" java.lang.UnsupportedClassVersionError: server/Server
 : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: server.Server.  Program will exit.
Press any key to continue . . .



Can someone plz help?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: The Wanderer on February 07, 2012, 02:01:43 AM
Compile the code or upgrade your jre.

@drop - fix your environment variables
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: I am beast on February 29, 2012, 08:23:28 PM
All my compiler says is:
Code: [Select]
Press any key to continue . . .
Here is the code for that compiler:
Code: [Select]
@echo off
"C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe" -sourcepath src src\*.java
src\sign\*.java -d bin
pause



When I try my normal compiler I get this:
Code: [Select]
javac: file not found: src\server\event\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .

With the code being:
Code: [Select]
@echo off
Title Compiler
"C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe" -d ./Class/ Java/*.java Java/sign/*.java
pause


This IS a client compiler, if that makes any difference. Anything would help. ;)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: imsuperman05 on February 29, 2012, 09:31:53 PM
Press any key to continue . . .

Means it compiled fine with no warnings/errors.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: I am beast on February 29, 2012, 10:51:12 PM
And yet it doesn't successfully compile... Because It's not updating what I put in... ^.^
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: wallykillaz on April 28, 2012, 10:59:55 PM
can somone help me pleassseee im trying to compile my source for my server but i get the error   "error:could not find or load main class *.java
you have sucsessfully compiled "           
the code in the compiler is @echo off
color 0a
title Compiler
if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
:compile
for /D %%x in ("%~1jdk*") do (set p="%%~x\bin\java.exe")
if defined p (%p% -cp . *.java)
if defined p (goto end)
:error
echo You do not have Java installed. Please download it at the site that is about to load.
"%programfiles%\Internet Explorer\iexplore.exe" http://www.oracle.com/technetwork/java/javase/downloads/index.html
:end
echo You have sucsessfully compiled
pause
exit     
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: The Wanderer on April 28, 2012, 11:08:55 PM
Not sure if that is exactly an error, but I think the solution of your problem is it says java.exe and it should be javac.exe. Although, I am not the best at writing batch scripts. :P
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: kingman002 on May 01, 2012, 07:22:20 PM
All my compiler says is:
Code: [Select]
Press any key to continue . . .
Here is the code for that compiler:
Code: [Select]
@echo off
"C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe" -sourcepath src src\*.java
src\sign\*.java -d bin
pause



When I try my normal compiler I get this:
Code: [Select]
javac: file not found: src\server\event\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .

With the code being:
Code: [Select]
@echo off
Title Compiler
"C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe" -d ./Class/ Java/*.java Java/sign/*.java
pause


This IS a client compiler, if that makes any difference. Anything would help. ;)
The first thing isn't an error. In fact, it is just saying it's done, there's no errors.
Second 1, idk.

This is my error that I don't understand...
Code: [Select]
client.java:23327: error: i is already defined in parseIncomingPackets()
                                for (int i = 0; i <= 6; i++) {
                                         ^
Note: stream.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
Press any key to continue . . .
This is my code
Code: Java
  1. case162:
  2.         if(System.currentTimeMillis()- lastCasted >30000){
  3.                        
  4.                 boolean hasLevel = playerLevel[6]>=94;
  5.                 boolean hasItems = playerHasItemAmount(557, 10)
  6.                         && playerHasItemAmount(560, 2)&& playerHasItemAmount(553, 4);
  7.                
  8.                 if(hasItems){
  9.                         if(hasLevel){
  10.                                 setAnimation(4410);    
  11.                                 txt4 ="Taste Vengeance!";
  12.                                 attackPlayersWithin(600, 17, 1);
  13.                                 inCombat();
  14.                                 deleteItem(557, getItemSlot(557), 10);
  15.                                 deleteItem(560, getItemSlot(560), 2);
  16.                                 deleteItem(553, getItemSlot(553), 4);
  17.                                 lastCasted =System.currentTimeMillis();
  18.                                 for(int i =0; i <=6; i++){
  19.                                         cba = abc /10;
  20.                                         abc2 = cba *2;
  21.                                         if(abc2 <=1){  
  22.                                                 abc2 =2;
  23.                                         }
  24.                                 }
  25.                         }else{
  26.                                 sendMessage("You don't have the required level to cast this spell.");
  27.                         }
  28.                 }else{
  29.                         sendMessage("You don't have the required runes to cast this spell.");
  30.                 }
  31.         }
  32.         break;
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: MelStone on May 28, 2012, 09:32:22 PM
Can anyone help me with this???
Code: [Select]
Player.java:81: error: invalid method declaration; return type required
                resetWalkingQueue();
                ^
1 error
Press any key to continue . . .
when my code is...
Code: [Select]
int absX = absY = -1;
int mapRegionX = mapRegionY = -1;
int currentX = currentY = 0;
resetWalkingQueue();
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: pucker on June 05, 2012, 03:23:00 PM
i just downloaded a server source and client, I changed it to my java and it sill wont work- Its a 564


Preparing...
A subdirectory or file bin already exists.
The system cannot find the file specified.
The system cannot find the file specified.
Compiling core...

^^that is what the compiler is saying when I try to compile.
---
@echo off
title rs2hd compiler
echo Preparing...
mkdir bin
cd src
copy log4j.xml ..
cd ..
move log4j.xml bin/
echo Compiling core...
"C:\Program Files\Java\jdk1.7.0_04\bin\javac" -d bin -cp deps/*; -sourcepath src src/com/rs2hd/Main.java
pause

^ Thats whats in my compiler, my Java is " jdk1.7.0_04 "

Please help
thanks
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Sarwar on June 11, 2012, 01:32:36 PM
I need help, its not on here though. When I'm Running Compiler It says "The System cannot find the path specified."
Why is this showing and how can i resolve this? please help me.. Thanks alot to anyone who helps me :)

- Lil_Smok3r
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on June 12, 2012, 12:18:07 AM
I need help, its not on here though. When I'm Running Compiler It says "The System cannot find the path specified."
Why is this showing and how can i resolve this? please help me.. Thanks alot to anyone who helps me :)

- Lil_Smok3r

I get this one too.

This is the code in my compiler.
Code: [Select]
@echo off
Title Compiler
"C:\Program\Java\jdk1.7.0_04\bin\javac.exe" *.java
pause
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: kickingjamie on June 12, 2012, 06:45:21 AM
"C:\Program\Java\jdk1.7.0_04\bin\javac.exe" *.java

Change the 1.7.0_04 to your version of jdk.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: pkstro on June 13, 2012, 03:36:26 AM
haha i remember when i used to have these problems:P
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: saltynuts on July 06, 2012, 10:25:29 AM
ok i have a compiler issue and idk how to fix, when i try compiling this pops up: javac: file not found: src\server\model\players\quests\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .                                    Im running a 317 project insanity and i have java 6 update 36 plus i have windows 32.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on July 07, 2012, 04:34:43 PM
ok i have a compiler issue and idk how to fix, when i try compiling this pops up: javac: file not found: src\server\model\players\quests\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .                                    Im running a 317 project insanity and i have java 6 update 36 plus i have windows 32.

I knew time travel was possible :eek:
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Pink Phat on July 17, 2012, 04:27:42 AM
ok i have a compiler issue and idk how to fix, when i try compiling this pops up: javac: file not found: src\server\model\players\quests\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .                                    Im running a 317 project insanity and i have java 6 update 36 plus i have windows 32.

I knew time travel was possible :eek:
lol he meant windows 32bit.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Owner Zack of PwnageScape on August 02, 2012, 11:22:56 AM
ok i have a compiler issue and idk how to fix, when i try compiling this pops up: javac: file not found: src\server\model\players\quests\*.java
Usage: javac <options> <source files>
use -help for a list of possible options
Press any key to continue . . .                                    Im running a 317 project insanity and i have java 6 update 36 plus i have windows 32.
Uhm, it's probably because you set your path wrong.
Or that there is no files in your Quests folder.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: ogxprime on August 05, 2012, 12:10:19 PM


"Starting...
Initiating Cache...
Exception in thread "Main" java.io.filenotfoundexception: data\cach\main_file_cach.dat2 <the system cannot find the path specified>
                         at java.io.randomaccessfile.open<native method>
                         at.java.io.randomaccessfile.<init>(unknown source)
                         at.java.io.randomaccessfile.<init>(unknown source)
                         at com.alex.store.store.>init><store.java:25>
                         at com.alex.store.store.<init><store.java:19>
                         at com.rs.cach.cach.init<cach.java:19>
                         at com.rs.launcher.main<launcher.java:74

Any help? im not that great at this.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Owner Zack of PwnageScape on August 05, 2012, 08:14:35 PM


"Starting...
Initiating Cache...
Exception in thread "Main" java.io.filenotfoundexception: data\cach\main_file_cach.dat2 <the system cannot find the path specified>
                         at java.io.randomaccessfile.open<native method>
                         at.java.io.randomaccessfile.<init>(unknown source)
                         at.java.io.randomaccessfile.<init>(unknown source)
                         at com.alex.store.store.>init><store.java:25>
                         at com.alex.store.store.<init><store.java:19>
                         at com.rs.cach.cach.init<cach.java:19>
                         at com.rs.launcher.main<launcher.java:74

Any help? im not that great at this.
Is it cach or cache? Look it up in the file.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: lavamaker7 on August 12, 2012, 06:37:02 PM
how do i fix this?
(https://www.dropbox.com/s/1c9xzpayksmxsr2/Capture.PNG)
right click and hit open in new tab
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Scape-JAVA on August 12, 2012, 11:37:42 PM
how do i fix this?
(https://www.dropbox.com/s/1c9xzpayksmxsr2/Capture.PNG)
right click and hit open in new tab

Don't use spaces in cfg files, use the tab key :).
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: RsMakerWoad on August 22, 2012, 07:12:59 AM
how do i fix this?
(https://www.dropbox.com/s/1c9xzpayksmxsr2/Capture.PNG)
right click and hit open in new tab

Don't use spaces in cfg files, use the tab key :).
She seems to know every god damn thing about rsps xD
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: nevs on August 23, 2012, 02:46:17 PM
When i try to run my server it says "Cannot find the path specified press any key to continue..." i tried some tips gaven to me but still the same thing happens.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on August 23, 2012, 02:50:32 PM
When i try to run my server it says "Cannot find the path specified press any key to continue..." i tried some tips gaven to me but still the same thing happens.

Show the code inside the compiler.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: StubernSnake on August 23, 2012, 09:28:44 PM
Compiler Result says "success" but didn't actually compile..?
I edited the quest tab and i compiled said it worked but I restarted server but there were no changes...?
I tried editing other things but same result? What am I doing wrong?

PS : Compiler only takes 1 Second (100ms) to 1.5 seconds (150ms) to compile 233 classes...

PSS : Base : Project Insanity 317  More detail : Zanaris 317

Code: [Select]
[23/08/12 10:26 PM]: starting javac++
[23/08/12 10:26 PM]: by blakeman8192

[23/08/12 10:26 PM]: build arguments:
        -d build\classes -cp lib;lib\commons-compress-1.0.jar;lib\google-api-tra
nslate-java-0.95.jar;lib\javac++.jar;lib\jython.jar;lib\log4j-1.2.15.jar;lib\min
a-core-1.1.5.jar;lib\mina.jar;lib\mysql-connector-java-3.1.14.jar;lib\mysql.jar;
lib\netty-3.2.4.Final.jar;lib\poi.jar;lib\slf4j-jdk14-1.6.1.jar;lib\slf4j-nop.ja
r;lib\slf4j.jar;lib\xpp3_min-1.1.4c.jar;lib\xstream-1.3.1.jar;lib\xstream.jar; -
sourcepath src;src\server;src\server\cycle;src\server\Interface;src\server\ls;sr
c\server\model;src\server\model\content;src\server\model\hits;src\server\model\h
its\impl;src\server\model\items;src\server\model\items\container;src\server\mode
l\minigames;src\server\model\npcs;src\server\model\npcs\impl;src\server\model\ob
jects;src\server\model\players;src\server\model\players\combat;src\server\model\
players\contents;src\server\model\players\packets;src\server\model\players\savin
g;src\server\model\players\skills;src\server\model\shops;src\server\net;src\serv
er\path;src\server\util;src\server\util\log;src\server\world;src\server\world\cl
ip; src\server\Config.java src\server\cycle\CycleEvent.java src\server\cycle\Cyc
leEventContainer.java src\server\EngineTask.java src\server\GameEngine.java src\
server\Interface\Interface.java src\server\Interface\InterfaceAction.java src\se
rver\ls\LoginResponse.java src\server\model\Attackable.java src\server\model\con
tent\MoneyPouch.java src\server\model\hits\Hit.java src\server\model\hits\HitEff
ect.java src\server\model\hits\HitManager.java src\server\model\hits\impl\Healin
gEffect.java src\server\model\hits\impl\LeechCurse.java src\server\model\hits\im
pl\MultiSpellEffect.java src\server\model\hits\impl\SampleHit.java src\server\mo
del\hits\impl\SmiteEffect.java src\server\model\hits\impl\SoulSplit.java src\ser
ver\model\hits\impl\TeleblockEffect.java src\server\model\items\BankSearch.java
src\server\model\items\container\Bank.java src\server\model\items\container\Inve
ntory.java src\server\model\items\container\ItemContainer.java src\server\model\
items\container\TradeContainer.java src\server\model\items\GameItem.java src\ser
ver\model\items\GroundItem.java src\server\model\items\Item.java src\server\mode
l\items\ItemAssistant.java src\server\model\items\ItemDefinition.java src\server
\model\items\ItemList.java src\server\model\items\UseItem.java src\server\model\
minigames\Barrows.java src\server\model\minigames\CastleWarObjects.java src\serv
er\model\minigames\CastleWars.java src\server\model\minigames\Dungeoneering.java
 src\server\model\minigames\FightCaves.java src\server\model\minigames\FightPits
.java src\server\model\minigames\FreeForAll.java src\server\model\minigames\Godw
arsBattle.java src\server\model\minigames\Lottery.java src\server\model\minigame
s\Onslaught.java src\server\model\minigames\PenguinHunt.java src\server\model\mi
nigames\PestControl.java src\server\model\minigames\RecipeForDisaster.java src\s
erver\model\minigames\RuneVersi.java src\server\model\minigames\TeamWars.java sr
c\server\model\minigames\TreasureTrails.java src\server\model\minigames\TriviaBo
t.java src\server\model\minigames\TrollMinigame.java src\server\model\minigames\
WarriorsGuild.java src\server\model\npcs\impl\Avatar.java src\server\model\npcs\
impl\AvatarOfDestruction.java src\server\model\npcs\impl\BalanceElemental.java s
rc\server\model\npcs\impl\bork.java src\server\model\npcs\impl\Bryan.java src\se
rver\model\npcs\impl\ChaosElemental.java src\server\model\npcs\impl\Corp.java sr
c\server\model\npcs\impl\Delrith.java src\server\model\npcs\impl\Dragon.java src
\server\model\npcs\impl\Drunk.java src\server\model\npcs\impl\FrostDragons.java
src\server\model\npcs\impl\GeneralGraador.java src\server\model\npcs\impl\Godwar
sMager.java src\server\model\npcs\impl\GodwarsMelee.java src\server\model\npcs\i
mpl\GodwarsRanger.java src\server\model\npcs\impl\Gorilla.java src\server\model\
npcs\impl\IceStrykewerms.java src\server\model\npcs\impl\Jad.java src\server\mod
el\npcs\impl\KalphiteQueen.java src\server\model\npcs\impl\Kamil.java src\server
\model\npcs\impl\KingBlackDragon.java src\server\model\npcs\impl\Kree.java src\s
erver\model\npcs\impl\Kril.java src\server\model\npcs\impl\MagicNPC.java src\ser
ver\model\npcs\impl\MetalDragon.java src\server\model\npcs\impl\Mummy.java src\s
erver\model\npcs\impl\Nomad.java src\server\model\npcs\impl\RangeNPC.java src\se
rver\model\npcs\impl\Shifter.java src\server\model\npcs\impl\SkeletalWyvern.java
 src\server\model\npcs\impl\Terrance.java src\server\model\npcs\impl\TormentedDe
mon.java src\server\model\npcs\impl\Zilyana.java src\server\model\npcs\NPC.java
src\server\model\npcs\NPCDefinition.java src\server\model\npcs\NPCDrops.java src
\server\model\npcs\NPCHandler.java src\server\model\npcs\NPCList.java src\server
\model\npcs\NPCLoaders.java src\server\model\objects\Object.java src\server\mode
l\objects\ObjectManager.java src\server\model\objects\Objects.java src\server\mo
del\objects\TempObject.java src\server\model\players\ActionHandler.java src\serv
er\model\players\ArmourDegradation.java src\server\model\players\BankPin.java sr
c\server\model\players\Clan.java src\server\model\players\ClanChatHandler.java s
rc\server\model\players\ClanWar.java src\server\model\players\ClanWarHandler.jav
a src\server\model\players\Client.java src\server\model\players\ClueScroll.java
src\server\model\players\combat\CachedDamage.java src\server\model\players\comba
t\Combat.java src\server\model\players\combat\CombatFormulas.java src\server\mod
el\players\combat\CombatUtil.java src\server\model\players\combat\DamageMap.java
 src\server\model\players\combat\LunarMagic.java src\server\model\players\combat
\MagicInformation.java src\server\model\players\CombatAssistant.java src\server\
model\players\contents\KillingStreak.java src\server\model\players\DialogueHandl
er.java src\server\model\players\DialogueOptionSelect.java src\server\model\play
ers\Food.java src\server\model\players\ItemChecking.java src\server\model\player
s\ObjectDelays.java src\server\model\players\PacketHandler.java src\server\model
\players\packets\AttackPlayer.java src\server\model\players\packets\BankX1.java
src\server\model\players\packets\ChallengePlayer.java src\server\model\players\p
ackets\ChangeAppearance.java src\server\model\players\packets\ChangeRegions.java
 src\server\model\players\packets\Chat.java src\server\model\players\packets\Cla
nChat.java src\server\model\players\packets\ClickingButtons.java src\server\mode
l\players\packets\ClickingInGame.java src\server\model\players\packets\ClickingS
tuff.java src\server\model\players\packets\ClickItem.java src\server\model\playe
rs\packets\ClickNPC.java src\server\model\players\packets\ClickObject.java src\s
erver\model\players\packets\ClientMacroDetect.java src\server\model\players\pack
ets\Commands.java src\server\model\players\packets\Dialogue.java src\server\mode
l\players\packets\DropItem.java src\server\model\players\packets\FollowPlayer.ja
va src\server\model\players\packets\IdleClient.java src\server\model\players\pac
kets\IdleLogout.java src\server\model\players\packets\ItemClick2.java src\server
\model\players\packets\ItemClick3.java src\server\model\players\packets\ItemOnGr
oundItem.java src\server\model\players\packets\ItemOnItem.java src\server\model\
players\packets\ItemOnNpc.java src\server\model\players\packets\ItemOnObject.jav
a src\server\model\players\packets\ItemOnPlayer.java src\server\model\players\pa
ckets\ItemOption1.java src\server\model\players\packets\ItemOption2.java src\ser
ver\model\players\packets\ItemOption3.java src\server\model\players\packets\Item
Option4.java src\server\model\players\packets\MagicOnFloorItems.java src\server\
model\players\packets\MagicOnItems.java src\server\model\players\packets\MoveIte
ms.java src\server\model\players\packets\PickupItem.java src\server\model\player
s\packets\PrivateMessaging.java src\server\model\players\packets\ReportAbuse.jav
a src\server\model\players\packets\SilentPacket.java src\server\model\players\pa
ckets\Trade.java src\server\model\players\packets\UserInput.java src\server\mode
l\players\packets\Walking.java src\server\model\players\packets\WearItem.java sr
c\server\model\players\PacketType.java src\server\model\players\Player.java src\
server\model\players\PlayerAssistant.java src\server\model\players\PlayerHandler
.java src\server\model\players\PlayerKilling.java src\server\model\players\Playe
rSave.java src\server\model\players\Position.java src\server\model\players\Potio
nMixing.java src\server\model\players\Potions.java src\server\model\players\savi
ng\PvpItemSaving.java src\server\model\players\SkillMenu.java src\server\model\p
layers\skills\Agility.java src\server\model\players\skills\Cooking.java src\serv
er\model\players\skills\Crafting.java src\server\model\players\skills\EnchantJ.j
ava src\server\model\players\skills\Farming.java src\server\model\players\skills
\Firemaking.java src\server\model\players\skills\Fishing.java src\server\model\p
layers\skills\FletchBow.java src\server\model\players\skills\FletchingLogs.java
src\server\model\players\skills\Herblore.java src\server\model\players\skills\He
rblore2.java src\server\model\players\skills\Herbloreold.java src\server\model\p
layers\skills\Hunter.java src\server\model\players\skills\ItemFletching.java src
\server\model\players\skills\Mining.java src\server\model\players\skills\Prayer.
java src\server\model\players\skills\Runecrafting.java src\server\model\players\
skills\Slayer.java src\server\model\players\skills\Smelting.java src\server\mode
l\players\skills\Smithing.java src\server\model\players\skills\SummoningByArrowz
.java src\server\model\players\skills\Thieving.java src\server\model\players\ski
lls\Woodcutting.java src\server\model\players\TradeAndDuel.java src\server\model
\players\Trading.java src\server\model\players\Z-FileSearcher.jar src\server\mod
el\shops\ShopAssistant.java src\server\model\SkillAction.java src\server\net\Cod
ecFactory.java src\server\net\ConnectionHandler.java src\server\net\ConnectionTh
rottleFilter.java src\server\net\GameCodecFactory.java src\server\net\HostList.j
ava src\server\net\Packet.java src\server\net\PacketBuilder.java src\server\net\
RS2LoginProtocolDecoder.java src\server\net\RS2ProtocolDecoder.java src\server\n
et\RS2ProtocolEncoder.java src\server\net\StaticPacketBuilder.java src\server\pa
th\PathFindingWorker.java src\server\path\PathRequest.java src\server\Server.jav
a src\server\Task.java src\server\TaskScheduler.java src\server\util\ISAACRandom
Gen.java src\server\util\log\Logger.java src\server\util\MD5.java src\server\uti
l\Misc.java src\server\util\ShutDownHook.java src\server\util\SimpleTimer.java s
rc\server\util\Stream.java src\server\util\XStreamUtil.java src\server\world\cli
p\ByteStream.java src\server\world\clip\ByteStreamExt.java src\server\world\clip
\MemoryArchive.java src\server\world\clip\ObjectDef.java src\server\world\clip\R
egion.java src\server\world\clip\RSObject.java src\server\world\InfractionManage
r.java src\server\world\ItemHandler.java src\server\world\ObjectManagerold.java
src\server\world\ShopHandler.java
[23/08/12 10:26 PM]: compiling...
[23/08/12 10:26 PM]: ----------------------------------------
[23/08/12 10:26 PM]: compiled 233 classes in 147ms
[23/08/12 10:26 PM]: compilation complete.
Press any key to continue . . .

Help would be appreciated thanks =)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: mattxy8 on August 31, 2012, 12:28:58 PM
Whenever I try to run my client, my run.bat gives me a bad argument error:
Code: [Select]
Bad argument count, Usage: worldid, <live/rc/wip>, <english/german>, game0/game1>
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: bulldog911 on November 07, 2012, 11:50:09 PM
[Nexus] Server is loading..
[Launcher] Initing Cache...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 19
        at com.rs.utils.Utils.getItemDefinitionsSize(Utils.java:268)
        at com.rs.cache.loaders.ItemsEquipIds.init(ItemsEquipIds.java:13)
        at com.rs.Launcher.main(Launcher.java:63)
Press any key to continue . . .

Little help please :/
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Host Gushers on November 10, 2012, 08:48:33 PM
This is what u call a good thread.
Thanks man u just saved my ass.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Daztech on January 03, 2013, 07:54:57 PM
PlayerHandler.java:473: error: ')' expected
            characterfile.write("character-Experience = ", Experience, 23); // S
aves your Experience.
                                                                          ^
1 error
Files Compiled Successfully!
Press any key to continue . . .

i got this error not sure how to fix

Code: [Select]
            characterfile.write("character-Experience = ", Experience, 23); // Saves your Experience.
            characterfile.write(Integer.toString(Experience), 0, Integer.toString(Experience).length());
                        characterfile.newLine();
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Jc22493 on January 03, 2013, 08:07:32 PM
Are you serious? Read the error.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Daztech on January 05, 2013, 03:39:34 AM
Are you serious? Read the error.
i did what it told me to do, dint fix the problem. maybe there is no problem with this code but somewhere else
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Host Gushers on January 05, 2013, 05:28:03 PM
You have saved my life once again sir <3
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: lare69 on January 12, 2013, 09:23:00 AM
no fuck this teach them how to use an ide properly
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Host Gushers on January 15, 2013, 09:09:07 PM
no fuck this teach them how to use an ide properly
You make me laugh my good sir.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: lare69 on January 29, 2013, 12:46:13 PM
no fuck this teach them how to use an ide properly
You make me laugh my good sir.
fuck you bitch

lol jk, love you man :D
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: pobdol on February 11, 2013, 03:54:32 AM
I've been having troubles with compilers needing an update? says this:

ECHO is off.
warning: .\sign\signlink.class: major version 51 is newer than 50, the highest m
ajor version supported by this compiler.
It is recommended that the compiler be upgraded.
Note: client.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Press any key to continue . . .
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on February 11, 2013, 05:37:39 PM
I've been having troubles with compilers needing an update? says this:

ECHO is off.
warning: .\sign\signlink.class: major version 51 is newer than 50, the highest m
ajor version supported by this compiler.
It is recommended that the compiler be upgraded.
Note: client.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Press any key to continue . . .
Are you using Eclipse? If so, refer to this (https://stackoverflow.com/questions/8648842/downgrade-eclipse-ant-to-compile-while-using-older-jdk-libraries-java-1-7-1) article.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Lord dagoth on February 18, 2013, 08:11:18 PM
Runserver -
@echo off
title rs2hd compiler
echo Preparing...
mkdir bin
cd src/com
copy log4j.xml ..
cd ..
move log4j.xml bin
echo Compiling core...
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/Main.java
echo completed...

compile -
@echo off
title Element-X Compiler
echo Preparing...
mkdir bin
cd src/com
copy log4j.xml ..
cd ..
move log4j.xml bin
echo Compiling core...
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/Main.java
echo Compiling loginserver...
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/Main.java
echo Compiling packet handlers...
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/packethandler/*.java
echo Compiling logging system...
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/util/log/SLF4JAppender.java
echo Complete.
"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\javac" -d bin -cp deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar -sourcepath src src/com/rs2hd/tools/*.java
echo Complete.
pause

The errors i get are these:
Runserver:
Preparing...
A subdirectory or file bin already exists.
        1 file(s) copied.
        1 file(s) moved.
Compiling core...
javac: file not found: src\com\rs2hd\Main.java
Usage: javac <options> <source files>
use -help for a list of possible options
completed...
running server...
Error: Could not find or load main class com.rs2hd.Main
Press any key to continue . . .
echo running server...
title Server.
java -Xmx1024m -classpath bin;deps/jython.jar;deps/log4j-1.2.15.jar;deps/mina-core-1.1.7.jar;deps/slf4j-api-1.5.3.jar;deps/slf4j-log4j12-1.5.3.jar;xpp3-1.1.4c.jar;deps/xstream-1.3.1-20081003.103259-2.jar;deps/xpp3-1.1.4c.jar com.rs2hd.Main
pause

and this:
Preparing...
A subdirectory or file bin already exists.
        1 file(s) copied.
        1 file(s) moved.
Compiling core...
javac: file not found: src\com\rs2hd\Main.java
Usage: javac <options> <source files>
use -help for a list of possible options
completed...
running server...
Error: Could not find or load main class com.rs2hd.Main
Press any key to continue . . .

Help wanted!!
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on February 18, 2013, 08:31:53 PM
It can't find the Main.java file. Check to see if it's actually in your rs2hd folder.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Lord dagoth on February 27, 2013, 04:32:15 PM
It is actually it just cant find it for some reason? I never used 562 before.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on February 27, 2013, 07:01:29 PM
It is actually it just cant find it for some reason? I never used 562 before.
Post the contents of your rs2hd folder.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Lord dagoth on March 01, 2013, 12:43:11 PM
Well idk how to do that instead ill just post a link to the server download link so u can see what type of server it is. https://forum.moparscape.org/index.php/topic,484831.120.html/ Before you comment again though I'd like to point out I got rid of Some errors like where the java file is located "C:/Programs (x86) etc." and I fixed the mkdir path error which lead me to a new error with the rs2hd :/ and every thing is in the folder scr/com/RS2HD/Main.Java + some other stuff that doesnt affect the compiler. Problem is it can't Find Main.Java Idk how to fix it its a 562 server and I know js5_connect is a really big Issue on it but I think in this case thats not my only problem. It can't find the file specified. I hope you can tell me what its doing :/ or trying to do in this case.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: P5YCHO7 on March 15, 2013, 08:51:32 PM
Alright, I'm sure this has been posted somewhere before, but...
My compiler gives me this error:
Code: [Select]
client.java:3602: error: cannot find symbol
                        BufferedReader in = new BufferedReader(new FileReader(
                        ^
  symbol:   class BufferedReader
  location: class client
client.java:3602: error: cannot find symbol
                        BufferedReader in = new BufferedReader(new FileReader(
                                                ^
  symbol:   class BufferedReader
  location: class client
client.java:5223: error: cannot find symbol
                        BufferedReader in = new BufferedReader(new FileReader("c
onfig//"
                        ^
  symbol:   class BufferedReader
  location: class client
client.java:5223: error: cannot find symbol
                        BufferedReader in = new BufferedReader(new FileReader("c
onfig//"
                                                ^
  symbol:   class BufferedReader
  location: class client
client.java:9263: error: cannot find symbol
                BufferedReader characterfile = null;
                ^
  symbol:   class BufferedReader
  location: class client
client.java:9268: error: cannot find symbol
                        characterfile = new BufferedReader(new FileReader("./cha
racters/"
                                            ^
  symbol:   class BufferedReader
  location: class client
I've been looking for an answer for this for 3 straight hours now...
I tried what this thread said to do, and either I'm doing it wrong, or it isn't working.
Here are the lines of code:
Lines 3600-3616
Code: [Select]
public boolean banned(String host) {
try {
BufferedReader in = new BufferedReader(new FileReader(
"data/bannedusers.dat"));
String data = null;

while ((data = in.readLine()) != null) {
if (host.equalsIgnoreCase(data)) {
return true;
}
}
} catch (IOException e) {
System.out.println("Unable to ban player");
server.logError(e.getMessage());
}
return false;
}
Lines 3220-3237
Code: [Select]
public boolean checkLog(String file, String playerName) {
// check bans/mutes/chatlogs etc.. -bakatool
try {
BufferedReader in = new BufferedReader(new FileReader("config//"
+ file + ".txt"));
String data = null;
while ((data = in.readLine()) != null) {
if (playerName.equalsIgnoreCase(data)) {
return true;
}
}
} catch (IOException e) {
System.out.println("Critical error while checking for data!");
System.out.println(file + ":" + playerName);
e.printStackTrace();
}
return false;
}
Line 9263
Code: [Select]
BufferedReader characterfile = null;
Lines 9267-9272
Code: [Select]
try {
characterfile = new BufferedReader(new FileReader("./characters/"
+ playerName + ".txt"));
charFileFound = true;
} catch (FileNotFoundException fileex1) {
}
Can someone please help me with this? At the moment my server is just sitting with a bunch of bugs on it that I can't fix.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: John on March 15, 2013, 08:53:17 PM
Psycho, use an IDE.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Scape-JAVA on March 15, 2013, 08:57:08 PM
Import the BufferedReader io class.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: k1ng0frs on March 15, 2013, 08:58:33 PM
Code: [Select]
import java.io.BufferedReader;
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: P5YCHO7 on March 15, 2013, 08:59:19 PM
Thank you Scape-Java, saved my day. +rep
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: cosmokid2 on March 16, 2013, 09:26:56 PM
Whenever I upload a Client, people have to download JDK and compile it themselves in order for it to work. Is there a way to fix this?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: DeathsChaos9 on March 16, 2013, 09:37:10 PM
Compile the client before you upload it.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: cosmokid2 on March 16, 2013, 10:06:46 PM
Compile the client before you upload it.

I do and they still have to have compile it themselves
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: DeathsChaos9 on March 16, 2013, 10:35:33 PM
Compiled java code can be run on any JVM, there's no reason anyone should have to compile it unless you're not supplying the .class files that compiling creates.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: cosmokid2 on March 16, 2013, 10:54:36 PM
Compiled java code can be run on any JVM, there's no reason anyone should have to compile it unless you're not supplying the .class files that compiling creates.

Idk, its just stupid lol
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: itsconnor on April 14, 2013, 09:49:00 AM
how do I fix this error?
(http://i45.tinypic.com/14kbexd.png)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Host Gushers on April 17, 2013, 12:55:15 PM
how do I fix this error?
(http://i45.tinypic.com/14kbexd.png)
you have extra tabbing or spacing in your ItemHandler class or item.cfg.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Ashi on April 17, 2013, 12:59:06 PM
Next up should be start up failures such as runtime errors, heapsizes etc :P
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: deadlyhorror on April 18, 2013, 08:05:23 PM
Maybe add the "Incompatible Types" error?

Just a suggestion :)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: jcmaddox1 on June 19, 2013, 03:53:09 PM
Trying to compile fromt he rune-evo source and i get the error
"Note: src\com\rs\content\exchange\GrandExchange.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details"
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on June 19, 2013, 05:34:22 PM
Trying to compile fromt he rune-evo source and i get the error
"Note: src\com\rs\content\exchange\GrandExchange.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details"
It's not an error, it's a note. It should have compiled fine.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: wuzziefuzzy on July 04, 2013, 08:43:23 AM
pls i need hellp with this error add my on skype:wuzziefuzzy
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Ambokile on July 04, 2013, 11:02:34 AM
Trying to compile fromt he rune-evo source and i get the error
"Note: src\com\rs\content\exchange\GrandExchange.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details"

Your compilation compiled fine, that's just a warning.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Sambu on July 29, 2013, 10:49:18 AM
(http://i42.tinypic.com/14in311.png) Eny1? I got like thousand of these errors, and ive tryed everything. I did read before trying out, edited but nothing helped.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Ambokile on July 29, 2013, 11:48:35 AM
(http://i42.tinypic.com/14in311.png) Eny1? I got like thousand of these errors, and ive tryed everything. I did read before trying out, edited but nothing helped.
You haven't encapsulated the string in quotation marks.

Code: Java
  1. sendNpcChat4(("Hello, "+ c.playerName+","),  "I am the Survival Expert. I'll teach you", "woodcutting, fishing and cooking.", "They're my favourite skills!", c.talkingNpc, "Survival Expert");
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Sambu on July 29, 2013, 03:10:27 PM
Code: [Select]
                                                                   ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:150: error: cannot find symbol
                                        c.getDH().sendDialogues(39, i);
                                                                    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:156: error: cannot find symbol
                                        c.getDH().sendDialogues(37, i);
                                                                    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:158: error: cannot find symbol
                                        c.getDH().sendDialogues(31, i);
                                                                    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:160: error: cannot find symbol
                                                        c.getDH().sendDialogues(
33, i);

    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:162: error: cannot find symbol
                                                        c.getDH().sendDialogues(
34, i);

    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:164: error: cannot find symbol
                                        c.getDH().sendDialogues(36, i);
                                                                    ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:168: error: cannot find symbol
                        c.getDH().sendDialogues(9, i);
                                                   ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\ActionHandler.java:171: error: cannot find symbol
                        c.getDH().sendDialogues(100, i);
                                                     ^
  symbol:   variable i
  location: class ActionHandler
server\model\players\DialogueHandler.java:30: error: cannot find symbol
                        sendNpcChat4("Greetings, "+c.playerName+"!", "Welcome to
 The 2007scape!", "Before you can go to the mainland,", "you'll have to complete
 Tutorial Island.", c.talkingNpc, "RuneScape Guide");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:34: error: cannot find symbol
                        sendNpcChat4("Here you will learn many valuable skills",
 "that will come in handy during your", "adventures. Just go through the door to
 get", "to your 1st instructor. Goodluck!", c.talkingNpc, "RuneScape Guide");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:38: error: cannot find symbol
                        sendNpcChat4("Hello, "+c.playerName+".", "I am the Survi
val Expert. I'll teach", "you woodcutting, fishing, and cooking.", "There my fav
orite skills!", c.talkingNpc, "Survival Expert");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:42: error: cannot find symbol
                        sendNpcChat2("Here, you'll need these for our", "lesson.
", c.talkingNpc, "Survival Expert");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:46: error: method sendStatement in cla
ss DialogueHandler cannot be applied to given types;
                        sendStatement("The Survival Expert hands you some suppli
es");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:50: error: cannot find symbol
                        sendNpcChat4("Cut down a tree and use the", "tinderbox o
n the logs to start a fire.", "Fish some shrimp from the pond and cook", "them o
n the fire. Then talk to me.", c.talkingNpc, "Survival Expert");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:54: error: cannot find symbol
                        sendNpcChat4("That was great!", "You learn fairly quick,
 adventurer.", "Go through the gate to the East and", "talk to the Master Chef t
o continue.", c.talkingNpc, "Survival Expert");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:58: error: cannot find symbol
                        sendNpcChat4("Hello, adventurer! I am the", "Master Chef
 of Tutorial Island.", "I'll be teaching you how to", "cook and make bread.", c.
talkingNpc, "Master Chef");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:62: error: cannot find symbol
                        sendNpcChat2("Wait... Didn't the Survival Expert", "alre
ady teach me that?", c.playerId, "Adventurer");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:66: error: cannot find symbol
                        sendNpcChat4("Yes, but I'll be teaching you", "how to co
ok food properly.", "Only slobs cook food on a fire, hehe.", "Here, you'll need
these ingredients.", c.talkingNpc, "Master Chef");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:70: error: method sendStatement in cla
ss DialogueHandler cannot be applied to given types;
                        sendStatement("The Master Chef hands you water and flour
");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:74: error: cannot find symbol
                        sendNpcChat4("Use the water on the flour and make dough.
", "Cook the dough on the range.", "Then come and talk to me.", "It shouldn't be
 too hard.", c.talkingNpc, "Master Chef");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:78: error: cannot find symbol
                        sendNpcChat4("Good job! Go through the door to the East"
, "and talk to the Quest Guide", "to continue.", "Goodluck!", c.talkingNpc, "Mas
ter Chef");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:82: error: cannot find symbol
                        sendNpcChat4("Greetings, adventurer. I am the Quest", "G
uide. You can view quests in the", "Quest Tab. Completing quests can unlock", "p
owerful and useful abilities, like", c.talkingNpc, "Master Chef");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:86: error: cannot find symbol
                        sendNpcChat4("Ancient Magicks, dragon weapons,", "new ar
eas to explore, and more!", "Head down the ladder to go to your next", "tutor. G
oodluck.", c.talkingNpc, "Quest Guide");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:90: error: cannot find symbol
                        sendNpcChat4("Aye, hello there, "+c.playerName+".", "I a
m the Mining Instructor.", "I'll be teaching you how to mine ores", "and smith t
hem into weapons and armours.", c.talkingNpc, "Quest Guide");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:94: error: cannot find symbol
                        sendNpcChat2("Take this. You'll need it for", "your trai
ning.", c.talkingNpc, "Mining Instructor");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:98: error: method sendStatement in cla
ss DialogueHandler cannot be applied to given types;
                        sendStatement("The Mining Instructor hands you a bronze
pickaxe");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:102: error: cannot find symbol
                        sendNpcChat4("Use the pickaxe to mine copper and tin.",
"Put them in the forge, they will melt", "together and come out a bronze bar. Us
e the", "bronze bar on the anvil and make a dagger.", c.talkingNpc, "Mining Inst
ructor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:106: error: cannot find symbol
                        sendNpcChat2("Come and talk to me when", "your finished.
", c.talkingNpc, "Mining Instructor");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:110: error: cannot find symbol
                        sendNpcChat2("Aye, that's a mighty fine dagger. Go throu
gh", "the gate to the West to continue.", c.talkingNpc, "Mining Instructor");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:114: error: cannot find symbol
                        sendNpcChat2("Aye, that's a mighty fine bread. Go throug
h", "the gate to the West to continue.", c.talkingNpc, "Master Chef");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:118: error: cannot find symbol
                        sendNpcChat4("Greetings, adventurer!", "I was wondering
when you'd show up.", "I'm the Combat Instructor.", "I'll teach you range and me
lee skills.", c.talkingNpc, "Combat Instructor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:122: error: cannot find symbol
                        sendNpcChat2("Here, take this. You'll need", "a weapon a
nd some protection.", c.talkingNpc, "Combat Instructor");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:126: error: method sendStatement in cl
ass DialogueHandler cannot be applied to given types;
                        sendStatement("The Combat Instructor hands you a sword,
a shield, a bow and arrows");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:130: error: cannot find symbol
                        sendNpcChat2("Go and kill 1 rat and bring me there meat.
", "Be careful, adventurer.", c.talkingNpc, "Combat Instructor");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:134: error: cannot find symbol
                        sendNpcChat4("Eh, good job I guess.", "You still need to
 work on your technique.", "I'll let you keep those items for your", "adventures
. Head up the ladder to the North.", c.talkingNpc, "Combat Instructor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:138: error: cannot find symbol
                        sendNpcChat4("Hello. I am the Financial Advisor.", "I'll
 teach you how to make money.", "skills such as fishing are great", "money maker
s. Monsters can drop", c.talkingNpc, "Financial Advisor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:142: error: cannot find symbol
                        sendNpcChat4("valuable items that can be sold.", "Player
 killing can get you a lot of money,", "but it's very dangerous.", "Go through t
he door to the West to proceed.", c.talkingNpc, "Financial Advisor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:146: error: cannot find symbol
                        sendNpcChat4("Salutations. I am Brother Brace.", "I will
 teach you how to train prayer.", "It's very useful, and could even save", "your
 life! Here, take this.", c.talkingNpc, "Brother Brace");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:150: error: method sendStatement in cl
ass DialogueHandler cannot be applied to given types;
                        sendStatement("Brother Brace hands you some bones");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:154: error: cannot find symbol
                        sendNpcChat2("Bury the bones and then", "talk to me agai
n.", c.talkingNpc, "Brother Brace");
                        ^
  symbol:   method sendNpcChat2(String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:158: error: cannot find symbol
                        sendNpcChat4("Good work. Different bones give different"
, "amounts of xp. You will find that dragon", "bones give you the most. Go throu
gh the door to", "the South. Your almost done!", c.talkingNpc, "Brother Brace");

                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:162: error: cannot find symbol
                        sendNpcChat4("Greetings, "+c.playerName+"!", "You've mad
e it to the end of the tutorial!", "I'll give you some runes so you can train",
"magic on the mainland.", c.talkingNpc, "Magic Instructor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
server\model\players\DialogueHandler.java:166: error: method sendStatement in cl
ass DialogueHandler cannot be applied to given types;
                        sendStatement("Use the portal now, to go mainland!");
                        ^
  required: Client,String
  found: String
  reason: actual and formal argument lists differ in length
server\model\players\DialogueHandler.java:170: error: cannot find symbol
                        sendNpcChat4("Just step through the portal next to me",
"to go to Lumbridge. You'll find my", "friend the Lumbridge Guide there. He'll",
 "help you if you need anything.", c.talkingNpc, "Magic Instructor");
                        ^
  symbol:   method sendNpcChat4(String,String,String,String,int,String)
  location: class DialogueHandler
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
58 errors
Press eny key to continue . . .
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Ambokile on July 29, 2013, 03:23:32 PM
You have a mismatch between the amounts of }s and {s.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Sambu on July 29, 2013, 04:28:01 PM
Oh.. Brb..
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Ambokile on July 29, 2013, 04:31:00 PM
Using an IDE such as Eclipse will help fix the issue.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Sambu on July 29, 2013, 04:35:17 PM
Using an IDE such as Eclipse will help fix the issue.

I have eclipse but idk it doesnt show errors or enything.. it doesnt even run the server with on eclipse

Run.bat:
(http://i41.tinypic.com/j9yp86.png)
(http://i42.tinypic.com/dzh66w.png)

Eclipse:
(http://i41.tinypic.com/4qmiu.png)
(http://i42.tinypic.com/160abo3.jpg)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Dave is pro on August 09, 2013, 07:26:48 PM
----------------------------------------------
 java.net.MalformedURLException : no protocol :
   at java.net.URL<init><unknown source>
   at java.net.URL<init><unknown source>
   at java.net.URL<init><unknown source>
   at loader.openFrame<load.java:117>
   at loader.doFrame<loader.java:61>
   at loader.main<loader.java45>
---------------------------------------------
Thats my error in the CLIENT of my CMD Help will be greatly appriciated. sorry if its already posted in your thread im kinda new
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on August 09, 2013, 08:36:59 PM
----------------------------------------------
 java.net.MalformedURLException : no protocol :
   at java.net.URL<init><unknown source>
   at java.net.URL<init><unknown source>
   at java.net.URL<init><unknown source>
   at loader.openFrame<load.java:117>
   at loader.doFrame<loader.java:61>
   at loader.main<loader.java45>
---------------------------------------------
Thats my error in the CLIENT of my CMD Help will be greatly appriciated. sorry if its already posted in your thread im kinda new
https://stackoverflow.com/questions/1706493/java-net-malformedurlexception-no-protocol
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: godmarin on March 15, 2014, 02:41:57 AM
Ok well i have that 100 error thing and i don't understand what i am to do with the code you posted, plus i think that my compiler is not doing what it needs to do, i am using 742, i edit the player file to make my account the owner and some other things like setting weapon bonus's higher but nothing changes ingame after compiling.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: N_A on March 16, 2014, 10:53:53 PM
Ok well i have that 100 error thing and i don't understand what i am to do with the code you posted, plus i think that my compiler is not doing what it needs to do, i am using 742, i edit the player file to make my account the owner and some other things like setting weapon bonus's higher but nothing changes ingame after compiling.
When you compile, and it outputs errors, then you won't see the changes made take effect. 100 errors is often a missing/misplaced brace ({ or }) or a semicolon (;). You could use an IDE (https://en.wikibooks.org/wiki/Java_Programming/Java_IDEs) to help locate the error in your code.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: LonelySouls on April 18, 2014, 01:23:20 AM
I have this error, is anyone able to give me any suggestions to help? Thanks

ERROR! THREAD NAME: mainjava.lang.NumberFormatException: For input string: ""

   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at com.rs.utils.NPCSpawns.loadSpawns(NPCSpawns.java:40)
   at com.rs.Launcher.main(Launcher.java:90)
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: DeathsChaos9 on April 18, 2014, 06:47:59 PM
*JESUS*, the NumberFormatException is a runtime error and is thrown when attempting to convert a string into a number when the string is not numeric. In this case, you are trying to turn an empty string into a number which of course is impossible. I can't tell you exactly what the problem is but I can tell you that there appears to be missing data in the file that loads NPCs. If you've recently edited that file go back and make sure that the new line(s) you added contain the correct amount of data.

 
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Justin Bieber on April 23, 2014, 08:03:05 AM
*JESUS*, the NumberFormatException is a runtime error and is thrown when attempting to convert a string into a number when the string is not numeric. In this case, you are trying to turn an empty string into a number which of course is impossible. I can't tell you exactly what the problem is but I can tell you that there appears to be missing data in the file that loads NPCs. If you've recently edited that file go back and make sure that the new line(s) you added contain the correct amount of data.

 
It's a runtime exception, not error. Error is generally used only internally by the JVM, to signal situations (e.g. out of memory) from which you can not recover.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: DeathsChaos9 on April 29, 2014, 11:46:00 PM
I know, the threads title reinforces that. No idea why I put error.
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: Zen-Birth on January 15, 2015, 11:21:26 AM
Can anyone help me with a "java.net.UnknownHostException:" error?
Title: Re: Common Compiler Errors and Runtime Exceptions [ALL COMPILER RELATED ISSUES]
Post by: doom_j on January 15, 2015, 11:27:59 AM
Can anyone help me with a "java.net.UnknownHostException:" error?

What is the ip you used.