trying to run test java from cmd
NickName:jasmin Ask DateTime:2016-09-14T02:51:05

trying to run test java from cmd

I am trying to run my Java program from the command prompt. When I do the main method inside my class it works just fine when I use the following command :

path\out\production> java -cp .;"../../../lib/*" Class Package.ClassName

But when I try to run the class test with the same command but changing out to test like this:

path\out\test> java -cp .;"../../../lib/*" Class Package.Class Name

It gives me an error.

I don't really know what I am missing.

Copyright Notice:Content Author:「jasmin」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39477071/trying-to-run-test-java-from-cmd

More about “trying to run test java from cmd” related questions

trying to run test java from cmd

I am trying to run my Java program from the command prompt. When I do the main method inside my class it works just fine when I use the following command : path\out\production> java -cp .;"../...

Show Detail

Java run cmd security

I am trying to run an example to start the CMD. I am getting an error from the execution. The file is of course in the right place. So my guess is that this is a permission error. Can someone lead ...

Show Detail

java run cmd commands

I have some problem about run windows cmd ,when I run my code on GEL or some java tool,it works,but it run error that windows can't find "pscp".However,I export execute jar from eclipse and java -j...

Show Detail

Run multiple cmd commands from java

I want to run multiple cmd commands succesively from java code one after the other. I want to use this one command line application which creates ssh connection and I want to run multiple commands

Show Detail

Trying to build/run java program from cmd line with external library

I am trying to run a java program from the cmd line but I have an external library, as per below: I have tried the advice from this previous question (Java - Build and run eclipse project from com...

Show Detail

Running java from the cmd

Trying to run a simple file called Test.java from the cmd. by javac Test.java it appears to run, but nothing is printed to the terminal? public class Test { public static void main(String[] ar...

Show Detail

Run Jar related .Java from cmd

I am trying to do "javac Classname.java" from cmd prompt, and this Classname.java requires Jfreechart libraries/jars, and runs fine if compiled from Eclipse (because project package has j...

Show Detail

How to test Dockerfile RUN and CMD?

I'm trying to understand how Dockerfile's RUN and CMD works. From: https://docs.docker.com/engine/reference/builder/ The RUN instruction will execute any commands in a new layer on top of ...

Show Detail

Runtime.exec() Java to run cmd script

I am trying to use Runtime to run a simple cmd script. Below I have two examples. When I run the command strings by hand in a cmd shell, they produce the desired result. When I run this program, co...

Show Detail

Unable to run java from CMD

I'm not sure what I'm doing wrong... I'm following several YouTube videos and I'm still unable to run my java program from the command prompt. VERY first thing I did in cmd was: set path="[copied...

Show Detail