| |

VerySource

 Forgot password?
 Register
Search
View: 1294|Reply: 10

How to use external jar files in java

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-20 16:20:01
| Show all posts |Read mode
Now looking at struts, you need to use the struts.jar file. But when using import, you cannot import struts.jar and check some information on the Internet. It says that you only need to copy the jar file to the classpath. I did but Not yet. May I ask your comrades for suggestions?

Also: I didn't use ide, just compiled under cmd.
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-30 00:00:02
| Show all posts
Put in web-inf / lib / struts.jar under the project
Reply

Use magic Report

0

Threads

6

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-2 08:09:01
| Show all posts
COPY directly to the folder, refresh the project and you can use
Reply

Use magic Report

0

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Invalid IP Address

Post time: 2020-2-12 13:15:01
| Show all posts
You want to use the class definition in struts.jar, so import the class you want to use, not the entire jar file.
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-2 13:15:02
| Show all posts
Your project has struts. jar?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-4 15:45:01
| Show all posts
In the added classpath, import should be available when used
Reply

Use magic Report

0

Threads

21

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 Invalid IP Address

Post time: 2020-3-12 00:45:01
| Show all posts
Taurus, no ide ...
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-3-13 20:45:01
| Show all posts
Use ide, put it in the WEB-INF / lib directory
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-4-11 18:30:02
| Show all posts
to:88776121
Put in the project web-inf / lib / struts.jar
================================================== =======
I am not using STRUTS.JAR in JSP. I am using it in javabean. But cannot compile.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-4-25 00:45:01
| Show all posts
Just take the classpath below. But restart the computer. :(
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