开发者

Executing a Number of Classes Java

开发者 https://www.devze.com 2022-12-16 01:55 出处:网络
Currently I have a folder with 6 classes. The main class being called \"Interaction\". I compile all the classes by using javac *.java

Currently I have a folder with 6 classes. The main class being called "Interaction".

I compile all the classes by using javac *.java

How do I run the program? When I type "java开发者_运维百科 Interaction" I get errors as the other classes are not being loaded. Its as if I need to link the other 4 classes into the main class. How do I do this?

Im using windows command prompt

Thanks Philip

Do I need to set all the program in a package or something?


Look at the CLASSPATH variable by typing "echo %CLASSPATH%" on the command prompt. Make sure it includes the current directory and any required jars. Compare it with the one used by Eclipse.

0

精彩评论

暂无评论...
验证码 换一张
取 消