Results 1 to 3 of 3
Thread: java in cmd line :(
- 02-01-2008, 01:24 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 21
- Rep Power
- 0
java in cmd line :(
Hey
im trying to write some build scripts for a java project. Anyway, it HAS to be in MS which has lead me through the pain of batch scripts.
Anyway, if I do this:-
java Main
the program runs fine, however if I move up a dirrectory level and execute the command like this:-
java classes\Main
it comes up with a java.lang.NoClassDefFoundError
anyone know why, and how to sort it?
thanks
Joe
- 02-01-2008, 03:14 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 762
- Rep Power
- 14
It is about the Java classpath. Classpath is where the java program will try to find your class. In this case excute the java command with the -classpath options set to tell java where you classes are located.
Website: Learn Java by Examples
- 02-01-2008, 09:51 AM #3
Examples
Hello Java2003.
I have created two examples for another member who had the same problems as you. Study the thread and attachments and then things should be easier for you. ;)
Good luck. :DEyes dwelling into the past are blind to what lies in the future. Step carefully.
Similar Threads
-
Java command line
By agouzoul in forum New To JavaReplies: 2Last Post: 04-02-2008, 01:12 PM -
calling linux command line in java
By fangzhong in forum New To JavaReplies: 0Last Post: 02-03-2008, 05:24 PM -
Reading in data from file line by line
By bluekswing in forum New To JavaReplies: 1Last Post: 10-02-2007, 01:19 AM -
Unable to execute command line command in java
By LordSM in forum New To JavaReplies: 1Last Post: 08-08-2007, 01:23 AM -
Java Command Line Arguments In Eclipse IDE
By JavaForums in forum EclipseReplies: 0Last Post: 05-19-2007, 10:45 AM
Bookmarks