Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I'm trying to find a way to determine the Minecraft Server version (ie. 12w40b, 1.4.5, etc) of a given Jar file without needing to start up the entire server process? (I have full control over the server, as I'm writing a basic admin interface)

  • Is there a command-line argument I can append to my java -jar ... command to have minecraft only print the version and exit?
  • Can I extract the Jar file and look/grep for a specific file?

UPDATE I've created an issue with the Minecraft Bug Tracker here, we'll see what happens from the Mojang team. :)

share|improve this question
    
linux or windows? –  ayckoster Dec 10 '12 at 16:35
    
I'm using linux –  Dominic Barnes Dec 10 '12 at 17:23
add comment

2 Answers

You can find the version of Minecraft running by typing about in the server console window.

share|improve this answer
add comment

You cannot do that with the ways you are outlining. You have 2 options:

  • Go by the date of the file, provides that you know when which version was released. You can find that here: http://www.minecraftwiki.net/wiki/Version_history
  • go by checksum of the version, provides that you have the checksum of each version in a table. You would have to create that first.
  • Start the server only until the first line of the output is reached, which outputs the version and kill it immediately.
share|improve this answer
    
Yeah, I already have the means to go with option 3, I'll probably just create a tmp dir to run that command in so I don't interfere with any of my active games/servers. –  Dominic Barnes Dec 10 '12 at 15:24
1  
You are assuming that he is using vanilla. Otherwise, the checksums would not be the same. –  Jeffrey Lin Dec 10 '12 at 21:05
    
Yes, since he is talking about the 12w40b snapshots, I assume he is using vanilla. Bukkit etc are using different version numbering. –  uncovery Dec 11 '12 at 4:37
    
There is no sure-fire way to do this (other than with vanilla). Server jars can completely revamp how minecraft outputs stuff and return crazy version numbers or no version numbers at all! –  Qix Dec 22 '12 at 22:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.