Results 1 to 5 of 5
- 05-07-2011, 01:38 PM #1
Member
- Join Date
- May 2011
- Posts
- 8
- Rep Power
- 0
What the heck??? Need urgent help!
Okay so whenever I try to compile something, it works normal, and if theres no problems, it will say something about System.out.printIn(); method...heres my example i forgot the ";" after something and it said one error, then once i fixed it it came with a bunch of crap...Im using 1.6 on Linux...heres my command line trying to compile it:
julian@ubuntu:~/Desktop/Java$ javac SetPoints.java
SetPoints.java:13: ';' expected
location.y=6
^
1 error
Then i fixed it by putting the ";" after "location.y=6"
julian@ubuntu:~/Desktop/Java$ javac SetPoints.java
SetPoints.java:7: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Starting location:");
^
SetPoints.java:8: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("X equals " + location.x);
^
SetPoints.java:8: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("X equals " + location.x);
^
SetPoints.java:9: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:9: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:11: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("\nMoving to (7,6)");
^
SetPoints.java:12: cannot find symbol
symbol : variable location
location: class SetPoints
location.x=7;
^
SetPoints.java:13: cannot find symbol
symbol : variable location
location: class SetPoints
location.y=6;
^
SetPoints.java:15: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("\nEnding location:");
^
SetPoints.java:16: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("X equals " + location.x);
^
SetPoints.java:16: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("X equals " + location.x);
^
SetPoints.java:17: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:17: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Y equals " + location.y);
^
13 errors
julian@ubuntu:~/Desktop/Java$ java SetPoints
Exception in thread "main" java.lang.NoClassDefFoundError: SetPoints
Caused by: java.lang.ClassNotFoundException: SetPoints
at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66)
Could not find the main class: SetPoints. Program will exit.
julian@ubuntu:~/Desktop/Java$ clear
julian@ubuntu:~/Desktop/Java$ javac SetPoints.java
SetPoints.java:7: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Starting location:");
^
SetPoints.java:8: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("X equals " + location.x);
^
SetPoints.java:8: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("X equals " + location.x);
^
SetPoints.java:9: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:9: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:11: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("\nMoving to (7,6)");
^
SetPoints.java:12: cannot find symbol
symbol : variable location
location: class SetPoints
location.x=7;
^
SetPoints.java:13: cannot find symbol
symbol : variable location
location: class SetPoints
location.y=6;
^
SetPoints.java:15: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("\nEnding location:");
^
SetPoints.java:16: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("X equals " + location.x);
^
SetPoints.java:16: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("X equals " + location.x);
^
SetPoints.java:17: cannot find symbol
symbol : variable location
location: class SetPoints
System.out.printIn("Y equals " + location.y);
^
SetPoints.java:17: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Y equals " + location.y);
^
13 errors
Heres my script:
import java.awt.Point;
class SetPoints {
public static void main(String arguments[]) {
System.out.printIn("Starting location:");
System.out.printIn("X equals " + location.x);
System.out.printIn("Y equals " + location.y);
System.out.printIn("\nMoving to (7,6)");
location.x=7;
location.y=6;
System.out.printIn("\nEnding location:");
System.out.printIn("X equals " + location.x);
System.out.printIn("Y equals " + location.y);
}
}Last edited by Julian; 05-07-2011 at 01:57 PM. Reason: im Julian, the writer and i accidently put code to find my Java folder
-
It's telling you (many times) that it can't find the location variable, that you've never declared it, and it's right. Solution: declare and initialize the variable.
Also, please avoid using "urgent" in your posts as it has the opposite effect that you've intended -- usually less folks will want to help you because it's not really our urgency, and no one wants to feel pushed, least of all volunteers who help for free.
Luck.
- 05-07-2011, 01:59 PM #3
Member
- Join Date
- May 2011
- Posts
- 8
- Rep Power
- 0
yeah sorry im new to this site (first time today) and im pretty new to java...how would you declare and initialize the variable (sorry for so many questions)
- 05-07-2011, 02:20 PM #4
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Also,
Java Code:System.out.printIn =/= System.out.println
-
Similar Threads
-
Urgent HELP!
By Mp4Player in forum New To JavaReplies: 2Last Post: 01-04-2011, 08:34 PM -
Urgent
By agentkiran007 in forum Advanced JavaReplies: 23Last Post: 08-08-2010, 03:59 PM -
[URGENT]SHA Encryption System...need urgent helps
By java_idiot in forum New To JavaReplies: 6Last Post: 05-02-2010, 10:04 AM -
Urgent
By ozgun in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 04-23-2010, 03:39 AM -
Urgent Help!!
By Winniee in forum New To JavaReplies: 5Last Post: 02-17-2009, 03:32 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks