Results 1 to 3 of 3
- 02-22-2012, 07:56 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 9
- Rep Power
- 0
[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 08:26 PM.
- 02-22-2012, 08:05 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 785
- Rep Power
- 12
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
- 02-22-2012, 08:22 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
Applet error "Fish.class not found" while running through Chrome.
By DaveAp7 in forum New To JavaReplies: 0Last Post: 02-02-2012, 08:24 AM -
Help! Program cannot run. Error is "java.lang.NullPointerException".
By bMorgan in forum New To JavaReplies: 3Last Post: 11-08-2010, 04:23 AM -
Runtime error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
By shantimudigonda in forum New To JavaReplies: 1Last Post: 11-20-2009, 08:58 PM -
Compiling/Running Project in Command Line: "Could not find main class" Error
By Yasemin Gokce in forum New To JavaReplies: 1Last Post: 06-30-2009, 03:32 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 08:35 AM
Bookmarks