0

I am using Intellij Idea to run a jade program. I have the ".jar" files in the environment variable "classpath". When I run the program from the IDE it works fine and finds the classes defined by me. But when I run the program from CMD it says

class not found.

The java files are in package name "msg". I am giving the following command:

java jade.Boot -gui f1:msg.first
Dovydas Šopa
  • 2,282
  • 8
  • 26
  • 34

1 Answers1

0

You should specify -classpath attribute for java (and ofc you should compile your java files before). For example:

 java -classpath jade-4.4.0.jar jade.Boot -gui f1:msg.first
nikelyn
  • 518
  • 3
  • 13
  • The jade.Boot file is running properly. The class not found exception is for the "msg.first" class. Program runs properly with IDE but not with terminal. What should I define as classpath? Any suggestion. – Palash Halder Jun 27 '17 at 09:45
  • then you should define the folder with your "msg" package with your first.class file. Can you attach the exception entirely? do you launch the command in the parent folder relative to your msg folder? – nikelyn Jun 27 '17 at 16:17