Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2008, 01:24 AM
Member
 
Join Date: Jan 2008
Posts: 14
Joe2003 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-01-2008, 03:14 AM
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 100
wsaryada is on a distinguished road
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:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-01-2008, 09:51 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
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.
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java command line agouzoul New To Java 2 04-02-2008 01:12 PM
calling linux command line in java fangzhong New To Java 0 02-03-2008 05:24 PM
Reading in data from file line by line bluekswing New To Java 1 10-02-2007 01:19 AM
Unable to execute command line command in java LordSM New To Java 1 08-08-2007 01:23 AM
Java Command Line Arguments In Eclipse IDE JavaForums Eclipse 0 05-19-2007 10:45 AM


All times are GMT +3. The time now is 02:53 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org