Question

I know it is probably a dumb question but I find no results in SO and no relevant results in google (here is the google search link where I searched 'what is jartmp').

I found there are many jartmp files in my folder and don't know why they exist:

-rw-rw-r-- 1      0 Jun 11 14:28 jartmp1089103248955132063.tmp
-rw-rw-r-- 1  54935 Jun  6 03:21 jartmp1258300977464933918.tmp
-rw-rw-r-- 1 118685 Jun 26 22:47 jartmp1388010323455694859.tmp
-rw-rw-r-- 1  15643 May 29 16:45 jartmp1819063406633422416.tmp
-rw-rw-r-- 1      0 Jun 11 16:03 jartmp2142600141373219701.tmp
-rw-rw-r-- 1 197964 Jun  6 03:19 jartmp3480763606864988668.tmp
-rw-rw-r-- 1 126386 Jun 26 22:47 jartmp3533722093029133854.tmp
-rw-rw-r-- 1   7830 Jun  6 03:19 jartmp3713382469327367468.tmp
-rw-rw-r-- 1  55872 Jun 21 15:14 jartmp3950308579438275722.tmp
-rw-rw-r-- 1  39716 Jun 11 16:03 jartmp4311759817318348544.tmp
-rw-rw-r-- 1      0 Jun 11 14:31 jartmp499113526131437419.tmp

I tried to use head *.tmp to see the content of the .tmp files, but it seems that they are all binary files. Can I know why these files are generated and whether it is safe to delete them?

And my java version is 1.6.0_24 for your reference.

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Was it helpful?

Solution

I can't imagine a circumstance where a file with that name would contain valuable data.

But if you are really worried, try using the file command to attempt to identify the files' types ... based on their contents.


How are they generated?

Well the most likely culprit would be some command that creates or unpacks JAR files. Try correlating the timestamps of the files with what you are / were doing at the time. That would help you narrow it down a bit.

OTHER TIPS

This could be result of jar -uvf operation on a jarred file to update a file to jar which is not present in actual path. This is just one of the reason I noticed where it shows this in shell/cmd o/p

: no such file or directory & ends up creating a tmp file (binary) file of pretty huge size.

I started running into this issue with the Java 8 jar.exe when supplying files to update in an archive where one or more of the files didn't exist. For example,

%ProgramFiles%\Java\jdk1.8.0_121\bin\jar.exe uvf0 ..\Desktop.jar Desktop\images\*.gif Desktop\reports\*.rep

where no file that matches the pattern Desktop\reports\*.rep exists, even though gif files in the other path do. In this case, the "jartmp" file remains and the jar file intended to be updated is left untouched. This is a change from Java 7, where jar.exe would happily replace the files it found and ignore the others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top