run java code
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   adam_salam
Posted On:   Sunday, September 4, 2005 08:52 AM

Hi there well, I am starting the ferst steps toward java programming, started with "Teach Yourself Java in 21 Days". after compiling some java codes, How can I RUN that code? I tryed >java >javac >java >javac Error C:Program FilesJavajdk1.5.0_04 in>java Motorcycle.class Exception in thread "main" java.lang.NoClassDefFoundError: Motorcycle/class C:Program FilesJavajdk1.5.0_04 in> with no avail...    More>>

Hi there
well, I am starting the ferst steps toward java
programming, started with "Teach Yourself Java in 21 Days".

after compiling some java codes, How can I RUN that code?

I tryed


>java

>javac

>java

>javac


Error


C:Program FilesJavajdk1.5.0_04 in>java Motorcycle.class

Exception in thread "main" java.lang.NoClassDefFoundError:
Motorcycle/class


C:Program FilesJavajdk1.5.0_04 in>


with no avail...

   <<Less

Re: run java code

Posted By:   pedro_sacosta  
Posted On:   Sunday, November 6, 2005 01:30 PM


javac file.java



java file

Re: run java code

Posted By:   WarnerJan_Veldhuis  
Posted On:   Sunday, September 4, 2005 12:57 PM

Omit the class extension: java -cp .
Note the -cp . parameter, it tells the JVM to search for the classes in the current directory
About | Sitemap | Contact