Results 1 to 5 of 5
- 07-19-2010, 12:27 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 15
- Rep Power
- 0
Error: Cannot find symbol during Importing package
How can i solved the compile error: Cannot find symbol for the following codes
symbol: class test2
location: test.test3
test2 aa = new test2();
I'm trying to instantiate test2.java in test3.java
Both the files are in C:\MyJavaProg\test
My java path is set to C:\Program Files\Java\jdk1.6.0_06
test2 code:
test3 code:Java Code:package test; public class test2 { public String f() { return ("abcd"); } }
Java Code:package test; import test.*; public class test3 { public static void main(String[] args) { [b]test2 aa = new test2();[/b] String bb = aa.f(); System.out.println(bb); } }
- 07-19-2010, 02:54 PM #2
Does the classpath point to the folder containing the test (your package) folder?
- 07-19-2010, 08:21 PM #3
you can put your test package right into your jdk bin folder :)
- 07-19-2010, 08:30 PM #4
NEVER.you can put your test package right into your jdk bin folder
Keep all of your code outside of the JDK's folders
- 07-21-2010, 10:36 AM #5
Member
- Join Date
- Jul 2010
- Posts
- 15
- Rep Power
- 0
Similar Threads
-
Cannot find symbol error
By rajivjoshi in forum New To JavaReplies: 3Last Post: 05-31-2010, 10:13 AM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
cannot find symbol symbol : class Item location: package platypos.services.order
By officialhopsof in forum New To JavaReplies: 3Last Post: 05-01-2008, 08:30 AM -
Error: cannot find symbol
By silvia in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:39 AM -
Error: cannot find symbol
By cachi in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 08:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks