Hi there, I figured I'd come here for a bit of help, and probably stick around for a while. I've been learning programming for about 6 years now, first BASIC, then C++, and now Java. I wouldn't exactly call myself a beginner in the concepts involved, but there's a lot of the 'basic' stuff I've been exposed to recently. I was writing Java programs before on a Linux machine, compiling and executing through the terminal. Although it was different than how I coded before (through Borland C++), it wasn't too difficult. Now I'm trying to code on my PC through the MS-DOS prompt. I found the java command to execute, but how do I compile my program? There isn't any javac command. I'm using the Java 1.4 SDK. Any help/tips would be appreciated Dan
Peter Wong
Greenhorn
Joined: Feb 18, 2003
Posts: 8
posted
0
you say this command : c:\path of jdk\bin\> javac yourprogram.java
Daniel Foreacre
Greenhorn
Joined: Feb 21, 2003
Posts: 4
posted
0
Does it have to be in the java sdk directory? I've got a program now just in C:\, for the sake of simplicity. ">javac Test.java" did SOMETHING, but then "java Test" brought up the "exception in thread "main" java.lang.NoClassDefFoundError: Test" error, which I assume means it wasn't compiled.... right? Dan
Peter Wong
Greenhorn
Joined: Feb 18, 2003
Posts: 8
posted
0
Is your program run "main" ?
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
make sure that your program has a properly formatted main method: public static void main(String[] args) { }