Programming

NetBeans에서 캐시를 지우는 방법

procodes 2020. 7. 6. 21:53
반응형

NetBeans에서 캐시를 지우는 방법


NetBeans에서 프로젝트를 작성했으며 NetBeans 캐시를 지우고 싶습니다.

Windows 7 컴퓨터에서 NetBeans 7.0.1을 실행하고 있습니다.

어떻게해야합니까?


7.2 이전에는 캐시가에 C:\Users\username\.netbeans\7.0\var\cache있습니다. 이 디렉토리를 삭제하면 캐시가 지워집니다.


캐시를 삭제하기 전에 NetBeans를 닫으십시오.

NetBeans 7.2 이상, Windows 7

캐시는에 있습니다 C:\Users\<username>\AppData\Local\NetBeans\Cache\.

%USERPROFILE%Windows 변수를 사용하여 캐시를 지우십시오 .

del /s /q %USERPROFILE%\AppData\Local\NetBeans\Cache\

설정된 경우 환경 변수를 사용할 수도 있습니다 %LOCALAPPDATA%.

del /s /q %LOCALAPPDATA%\NetBeans\Cache\

NetBeans 7.2 이상, Linux

캐시 위치 : ~/.cache/netbeans/${netbeans_version}/index/

맥 OS X

캐시 위치 : ~/Library/Caches/NetBeans/${netbeans_version}/

http://wiki.netbeans.org/FaqWhatIsUserdir참조하십시오 .

도움말 메뉴

Windows에서 도움말»정보 메뉴를 선택하면 다음 텍스트가 포함 된 대화 상자가 표시됩니다.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Username\AppData\Roaming\NetBeans\8.0.2
Cache directory: C:\Users\Username\AppData\Local\NetBeans\Cache\8.0.2

운영 체제에 관계없이 정보 대화 상자에는 캐시 디렉토리의 올바른 경로가 포함됩니다.


캐시 디렉토리의 경로는 정보 창 (메뉴 도움말 / 정보)에 표시됩니다. NetBeans를 닫은 다음 디렉토리를 삭제하거나 이름을 바꾸십시오. NetBeans는 시작할 때 캐시를 다시 작성합니다.


NetBeans 8.1이 설치된 Mac에서는

  1. NetBeans정보
  2. 정보 화면 에서 사용자 디렉토리 경로 찾기
  3. rm -fr 8.1귀하의 경우 버전이 다를 수 있습니다. 올바른 버전 폴더를 제거하십시오.
  4. NetBeans 다시 열기

캐시에 라이브러리가 누락되어 발생하는 참조 문제를 해결하려고 시도했으며 캐시를 삭제해도 문제가 해결되지 않았다고 덧붙입니다.

NetBeans (7.2.1)를 닫고 캐시를 삭제 한 다음 NetBeans를 다시 열었고 캐시를 다시 생성했지만 라이브러리가 여전히 누락되었습니다 (... / Cache / 7.2.1 / index / archives.properties에서 확인). .

이 문제를 해결하려면 NetBeans를 닫고 캐시를 삭제하기 전에 열려있는 프로젝트를 닫아야했습니다.


Linux의 Netbeans 7.4 이상에서 캐시는 $HOME/.cache/netbeans/7.4입니다.


창 7에서 캐시는 C : / Users / USERNAME / AppData / Local / NetBeans / Cache에 있습니다.


NetBeans cachedir은 커질 수 있고 자주 변경 될 수 있으며 언제든지 삭제하고 다시 작성할 수있는 파일로 구성된 디렉토리입니다. 예를 들어, Java 클래스 경로 스캔 결과는 cachedir에 있습니다.

NetBeans 7.1 이상 기본적으로 userdir은 사용자의 홈 디렉토리에 저장된 .netbeans라는 (숨겨진) 디렉토리 안에 있습니다. 홈 디렉토리는 Unix 계열 시스템에서 $ {HOME}이고 Windows에서는 % USERPROFILE % (보통 C : \ Documents and Settings \로 설정)입니다. cachedir은 userdir의 var / cache 하위 폴더에 있습니다. 이름에서 알 수 있듯이 userdir은 사용자마다 고유합니다. 설치된 각 버전의 NetBeans에서 userdir은 .netbeans /와 같은 고유 한 하위 디렉토리가됩니다. 정확한 사용자 디렉토리 위치를 찾으려면 IDE의 기본 메뉴로 이동하여 도움말> 정보를 선택하십시오. (Mac : NetBeans> NetBeans 정보). NetBeans 7.1에서는 스위치 --cachedir을 사용하여 캐시 디렉토리를 원하는 위치로 분리 할 수 ​​있습니다.

예제 NetBeans 5.0을 실행하는 Windows 사용자 jdoe는 C : \ Documents and Settings \ jdoe.netbeans \ 5.0 \에서 그의 userdir을 찾을 수 있습니다. NetBeans 5.0을 실행하는 Windows Vista 사용자 jdoe는 C : \ Users \ jdoe에서 그의 userdir을 찾을 수 있습니다. netbeans \ 5.0 \ NetBeans 5.0을 실행하는 Mac OS X 사용자 jdoe는 /Users/jdoe/.netbeans/5.0/에서 사용자 디렉토리를 찾을 수 있습니다 (Finder에서이 폴더를 열려면 Finder 메뉴에서 이동> 폴더로 이동을 선택하십시오, 상자에 /Users/jdoe/.netbeans/5.0/을 입력하고 이동을 클릭하십시오.) NetBeans 5.0을 실행하는 Linux 사용자 jdoe는 /home/jdoe/.netbeans/5.0/에서 그의 userdir을 찾을 수 있습니다.

더 많은 정보를 위해서

NetBeans 사이트에서이 설명서를 참조하십시오 : NetBeans 7.2 이상


For NetBeans 8+ on Windows 10 there's a definitive bug with duplicate classes error which is being solved by cleaning the cache at C:\Users\<user>\AppData\Local\NetBeans\Cache.


Just install cache eraser plugin, it is compatible with nb6.9, 7.0,7.1,7.2 and 7.3: To configure the plugin you have to provide the cache dir which is in netbean's about screen. Then with Tools->erase cache, you clear the netbeans cache. That is all, good luck.

http://plugins.netbeans.org/plugin/40014/cache-eraser


tl;dr You might not need to whack your entire NetBeans cache.


My problem manifested as running a clean build didn't delete the previous build folder or testuserdir folder, while I was using NetBeans 8.0.2.

The first time I had this problem, Ray Slater's answer above helped me immensely. I had two Project Groups, and had to close each project in both groups, close NetBeans, clear the cache, then add my projects back to my groups before it would work again.

Later, this problem cropped up again with NetBeans 8.1. I closed NetBeans, and ran ant build clean at the command line, and it worked. When I reopened NetBeans, the problem was resolved. It occurs to me that NetBeans was keeping something open and just needed to be closed in order to delete the folders.


Update
I finally figured out what was going on. Somehow, my NetBeans "Module Suite Project" (yellow/orange puzzle pieces icon) had been closed and the "Module Project" (purple puzzle piece icon) having the same exact name as the "Module Suite Project" was open. Building clean cleaned that particular Project correctly, but did not clean the entire Suite.

Now that I have the "Module Suite Project" opened correctly again, things work as expected. This explains why ant build clean worked, since it was done on the command line at the right level to clean the whole Suite.

I suspect I didn't strictly need to clean out my NetBeans cache at all though perhaps doing so actually fixed the issue of why it was only showing the "Module Project" instead of the "Module Suite Project", thereby doing the right thing when I clicked build clean... If I had simply realized that the Suite was no longer open and only the Project was, I could have fixed it in three seconds.


The cache is C:\Users\userName\AppData\Local\NetBeans\Cache\, and then the version name of the folder will specify the correct cache.

You can also do this: Close the IDE. Instead, of deleting files and risking everything, rename this cache folder. Now start the IDE. Once it starts, a new cache folder will be created since the folder is not found. Now you can delete the renamed folder safely.


I have tried this

UserName=radhason

C:\Users\radhason\AppData\Local\NetBeans\Cache

enter image description here

Press Ok button , then cache folder will be shown and delete this cache folder of netbeans.

참고URL : https://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans

반응형