| |

VerySource

 Forgot password?
 Register
Search
View: 1502|Reply: 11

The program runs fine under eclipse, but not under cmd

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-16 01:20:01
| Show all posts |Read mode
The simplest Welcome.java works fine under eclipse,
But under cmd, compiling javac is no problem, but when java Welcome, it appears
Exception int thread "main" java.lang.NoClassDefFoundError: Welcome
error.
May I ask how is this going?
Reply

Use magic Report

1

Threads

51

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-1-20 00:54:01
| Show all posts
With environmental parameters
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Germany

 Author| Post time: 2020-1-20 08:27:01
| Show all posts
Environment variable?
Already set up!
Can you say more upstairs!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-20 12:36:01
| Show all posts
This issue needs to be researched by yourself, and these things will not happen again
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-20 13:54:02
| Show all posts
Source code?
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-20 21:54:01
| Show all posts
Must be a problem with environment variables
Check your classpath
Post your environment variables
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-20 22:00:02
| Show all posts
Configure Classpath or add classpath to your command line
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-21 09:00:01
| Show all posts
Add ".," to the classpath.path environment variable. It may be that you ignore the current path.
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-21 09:36:02
| Show all posts
".;" Is wrong.
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-21 13:27:01
| Show all posts
.;% JAVA_HOME%\lib;% JAVA_HOME%\lib\tools.jar;
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list