Results 1 to 7 of 7
- 09-12-2010, 03:15 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 3
- Rep Power
- 0
What's the error in this program...
what's the **** error in this program... it is in SCJP directory
SFDR.java
----------------------------------------------------------------------------
----------------------------------------------------------------------------Java Code:package SCJP; import java.lang.*; public class SFDR { public static void main(String[] args) { System.out.println("this is a class following java code conventions"); } }Last edited by Fubarable; 09-12-2010 at 03:26 AM. Reason: profanity removed
-
- 09-12-2010, 03:35 AM #3
Member
- Join Date
- Sep 2010
- Posts
- 3
- Rep Power
- 0
Sorry for using wrong language sir,
the error while executing is...
<CODE>
Exception in thread "main" java.lang.NoClassDefFoundError: SFDR/java
Caused by: java.lang.ClassNotFoundException: SFDR.java
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: SFDR.java. Program will exit.
</CODE>
-
It looks to be a classpath issue. How are you compiling and running the code? Have you gone through the classpath section of the introductory tutorials?
- 09-12-2010, 03:58 AM #5
Member
- Join Date
- Sep 2010
- Posts
- 3
- Rep Power
- 0
No i don't have any knowledge about the class path
- 09-12-2010, 06:12 AM #6
These may be of some use:
Setting the class path
http://e-articles.info/e/a/title/How...ris-and-Linux/
- 09-12-2010, 06:23 AM #7
Member
- Join Date
- Sep 2010
- Posts
- 17
- Rep Power
- 0
just set the classpath as set classpath=c:\files where the java file is stored
Similar Threads
-
Program Error Help!!!
By arrech326 in forum New To JavaReplies: 6Last Post: 11-18-2009, 12:16 PM -
error running java program
By bdasilva in forum New To JavaReplies: 1Last Post: 06-29-2009, 01:46 AM -
I can't fix this runtime error in my program
By Sinnergy in forum New To JavaReplies: 5Last Post: 02-25-2009, 04:29 PM -
CRC check program 1 error
By javakid9000 in forum New To JavaReplies: 1Last Post: 03-19-2008, 05:04 AM -
Error: Cannot delete a.txt:It is being used by another person or program
By trill in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 07:34 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks