Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


JavaTrek is licensed under the GNU General Public License.
To view the license, please refer to the COPYING file.

JavaTrek is based on Chuck L. Peterson’s MTrek.

JavaTrek is a real time space combat simulator. Controlled via a keyboard through a telnet interface, you can choose from a variety of ships to battle it out for gold in a text based 3d environment.

Java Runtime Environment or SDK 1.6.0 or better.
MySQL database accessible from the machine running the server.

Running JavaTrek:
1. Download and install a compatible version of the Java Runtime Environment or SDK. (See above.)
2. Create your MySQL/PostgreSQL database and note it’s server, username, password and database name.
3. Execute the appropriate jtrek_tables.sql-xxxxxxx file inside the database so that the table structure is created.
4. Make a copy of “” and name it “”. Update the jdbc.driver, jdbc.url, jdbc.user and jdbc.password fields. Save the file.

Ensure that the bin/ folder in your Java JRE is in your system path.
Double click on the “runJTrekWindows.bat” file to start your server.

Ensure that the java binary is in your path.
Make sure “” is executable. When completed, execute “./” in the directory that you extracted JavaTrek to.

  • We’ve found that running JavaTrek in a screen is best. For more information on the screen command, refer to your distro documentation.

Edit the welcome.txt file to change what a user sees when they connect to your server.

The bots use a separate player account.
Log into JavaTrek and create an account with a dummy ship. Then quit the game. eg. “BotAccount” or similar.
Switch to the server console and type “show playerids”. This command will list player id numbers and player accounts in the database. Make a note of which player id is for your bot account.
Open the “” file and edit the bot.playerId entry by change the value to the specific account number. eg. If the id was 5, then the line should read bot.playerId=5.
Ensure that the respawn time is correct.
Ensure that bot.maxBots has the correct number of bots that you wish to run.
Switch to the server console and type “shutdown”.
Restart the server by executing the bat file or script.

Q ships are the “administrative” ships of the game. Basically indestructable. Powerful weapons. Infinite cloak.
Change the field “ship_class” in the “ships” table of one of your existing ships to “Q”.
eg. Execute this query in your database: UPDATE ships SET ship_class=“Q” WHERE ship_name=“Burninator”;
If you saved off a non-cloaking ship, you may want to set ship_cloak = true while you’re at it.

Admiral Commands: CTRL+A in a Q ship.
create gold – Creates an amount of gold.
create ship debris with gold – Creates some ship debris with 100 gold.
autofix – Turns AutoFix on.
show db data [] – Shows some database information for a ship.
show xyz [] – Shows the coordinates for a ship.
move to [] – Moves the Q ship to a specific ship.
change quad [a,b,g,d,o,n] – Choose a quadrant to move to. eg. change quad [a], change quad [n].
give all – Gives all inventory items to your ship.
send msg: – Sends an announcement to all players.
change name [name] – Temporarily changes your ship name.
toggle follow – Toggles following your current scan target.
heal ship [] – Restores shields and removes internal damage on the selected ship.
energize ship [] – Gives energy to the selected ship.
bring ship [] – Teleports the selected ship to you.
tractor beam – Toggle tractor beam for your current scan target.
spawn bot [] – Spawns a bot of the selected class.
kill ship [] – Destroys selected ship.
save ship [] – Saves selected ship.
save all ships – Saves all ships.
observe ship [] – Observes the selected ships telnet session.
send quad [<a,b,g,d,o,n>,] – Sends a ship to a quadrant.
send obj [,] – Teleports an object to a ship.
toggle bots – Toggles spawning of bots for this session.
set bot max [] – Sets the amount of bots to spawn.
set bot timeout [] – Sets the amount of sleep time between bot spawns.
debug bot [] – Gets some debug information about the bot.
toggle bot debug [] – Toggles debugging for the specific bot.
set bot skill [<1-5>,] – Sets the skill level for the specific bot.
toggle teamplay – Toggles team play on or off.
set team [0-9,] – Set’s the ships team number. 0 = no team.
toggle thx – Toggle old school THK gold ships.
resupply ship [] – Restocks the specific ship.
change class [,] – Change the class of the specific ship to . (Letter of class from login screen.)


JTrek - a real-time space combat simulator played via telnet session




No releases published


No packages published


You can’t perform that action at this time.