简体   繁体   English

如何删除JRE系统库中的.jar文件?

[英]how do I delete .jar files in the JRE System Library?

My homework assignment for my class gave me a lot of .java files to import, I was fiddling with eclipse trying to find a way to import them in the package (I did not realize I could just drag and drop..), but instead I imported them in the JRE System library folder, where I can no longer remove them. 我在课堂上的作业分配了很多要导入的.java文件,我对eclipse不太满意,试图找到一种将其导入包中的方法(我没有意识到我只能拖放..),而是我将它们导入到JRE System库文件夹中,无法再将其删除。

I understand the mistake that I made, however I cannot find a way to remove these files from JRE 1.7. 我理解我犯的错误,但是我找不到从JRE 1.7删除这些文件的方法。

I re-installed eclipse, and even deleted the JRE7 folder and reinstalled JRE. 我重新安装了eclipse,甚至删除了JRE7文件夹并重新安装了JRE。 But the files are still here. 但是文件仍然在这里。

JRE系统库

转到窗口->首选项-> Java->已安装的JRE->选择jre->编辑->在jar上单击以删除->在右侧菜单上删除。

Easier way would be 更简单的方法是

File->new java project->configure jre(blue text)->(it will show the installed jres and you can remove any which you dont want) File-> new java project-> configure jre(蓝色文本)->(它将显示已安装的jres,您可以删除不需要的任何内容)

Right click on "Exercise19" project => Build Path => Configure build path Goto to "libraries" tab. 右键单击“ Exercise19”项目=>构建路径=>配置构建路径转到“库”选项卡。 and remove this system library and click ok. 并删除此系统库,然后单击“确定”。 Above step may give some complication errors in your project. 上面的步骤可能会给您的项目带来一些复杂的错误。

Then try adding a new library (the correct one) via Eclipse "Window => Preferences => Java => Installed JREs" 然后尝试通过Eclipse“ Window => Preferences => Java => Installed JRE”添加一个新库(正确的库)。

Then go back to project => Build Path => Configure build path ("libraries" tab) and "Add library" => "JRE System Library", click ok. 然后返回项目=>构建路径=>配置构建路径(“库”选项卡),然后单击“添加库” =>“ JRE系统库”,单击“确定”。

it should fix the issue. 它应该解决此问题。

Q. How to remove JRE System Library from project? 问:如何从项目中删除JRE系统库?

Ans : Go to project then :然后去项目

Right click on project---> Build Path --> Configure build path 右键单击项目---> 构建路径 -> 配置构建路径

Now there are 4 tabs Source, Projects, Libraries, Order and Export 现在有4个选项卡Source,Projects,Libraries,Order和Export

Go to

Libraries tab --> click on JRE System Library --> Then Remove it. 库选项卡 -> 单击JRE系统库 ->然后删除


Q. How to add JRE System Library to project? 问:如何将JRE系统库添加到项目?

Ans : Go to project then :然后去项目

Right click on project---> Build Path --> Configure build path 右键单击项目---> 构建路径 -> 配置构建路径

Now there are 4 tabs Source, Projects, Libraries, Order and Export 现在有4个选项卡Source,Projects,Libraries,Order和Export

Go to

Libraries tab --> Click on Add Library (shown at the right side) --> select JRE System Library --> Next --> click Alternate JRE --> select Installed JRE--> Finish --> Apply--> OK. 库选项卡 ->单击添加库 (如右侧所示)->选择JRE系统库 -> 下一步 -> 单击备用JRE->选择已安装的JRE->完成->应用->好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM