| |

VerySource

 Forgot password?
 Register
Search
Author: xenon1

How to call an unpackaged class under a packaged class

  [Copy link]

0

Threads

18

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-1-25 18:27:01
| Show all posts
Java seems to not support the introduction of no package

Unless you recompile that class
Reply

Use magic Report

1

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 Invalid IP Address

Post time: 2020-1-25 18:36:01
| Show all posts
mark
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-28 12:18:01
| Show all posts
Append the path of the unpackaged class to the classpath in the environment variable
Reply

Use magic Report

0

Threads

6

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Japan

Post time: 2020-2-1 23:18:01
| Show all posts
You add a package to all the compiled class files provided by the manufacturer, that is, it saves the trouble of duplicate names.
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-2 10:00:01
| Show all posts
Put the folder containing the unpackaged class in the classpath

Or package all unpackaged classes into a JAR file

Then add this JAR file to your classpath
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-2 12:36:01
| Show all posts
Add the folder where your unpackaged class is located to the classpath.

And you can use another method to package your unpackaged class into a JAR file, and then add this JAR file to your classpath.
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-5 17:00:01
| Show all posts
I don't know if I can directly modify the class file and add package information. . .
Please master!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-24 09:15:02
| Show all posts
Just put their jar package under your application
Reply

Use magic Report

0

Threads

18

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-3-19 11:15:01
| Show all posts
Add a package name
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-5-18 12:45:02
| Show all posts
Use anti-compilation tools to modify the class file.
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