Results 1 to 3 of 3
  1. #1
    steamruler is offline Member
    Join Date
    Feb 2012
    Posts
    9
    Rep Power
    0

    Default [SOLVED] Running an program with "java" in CMD throws an error.

    Well, This error message comes up:


    It runs perfectly in Eclipse. 64-Bit machine. Willing to provide more info on request.

    MainClass.java
    Java Code:
    /**
     * 
     */
    package GCMD;
    
    /**
     * @author Sebastian
     *
     */
    public class MainClass {
    
    	/**
    	 * @param args
    	 */
    	public static void main(String[] args) {
    		System.out.print("Faal Grohiikkiin Lost Prodah Hin " + System.getProperty("user.name") + "!\n");
    		System.out.print("Rok Lost Prodah Hin Tinvaak " + java.util.Locale.getDefault() + "!\n");
    	}
    
    }
    Last edited by steamruler; 02-22-2012 at 07:26 PM.

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    786
    Rep Power
    5

    Default Re: Running an program with "java" in CMD throws an error.

    Its because you are calling it from the wrong directory (your are in the package) . Go one level lower to ...\bin and try
    java GCMD.MainClass

  3. #3
    steamruler is offline Member
    Join Date
    Feb 2012
    Posts
    9
    Rep Power
    0

    Default Re: Running an program with "java" in CMD throws an error.

    Quote Originally Posted by eRaaaa View Post
    Its because you are calling it from the wrong directory (your are in the package) . Go one level lower to ...\bin and try
    java GCMD.MainClass
    Hurr, im stupid. Thanks.

Similar Threads

  1. Replies: 0
    Last Post: 02-02-2012, 07:24 AM
  2. Replies: 3
    Last Post: 11-08-2010, 03:23 AM
  3. Replies: 1
    Last Post: 11-20-2009, 07:58 PM
  4. Replies: 1
    Last Post: 06-30-2009, 02:32 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •