Making a minecraft server GUI - MacRumors Forums
Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 19, 2011, 08:08 PM   #1
macguin
macrumors newbie
 
Join Date: Jul 2009
Making a minecraft server GUI

I am really tired of looking at the terminal window, trying to decipher through time stamps and iChat formatting what people are asking me. I was thinking I could make GUI application that would be built around the craftbukkit.jar file. The only problem is I do not know how to execute .jars in a program, how to send commands to them, or receive and parse information from them (like logout events or chat). It there any way to do this?
macguin is offline   0 Reply With Quote
Old Apr 19, 2011, 09:06 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Have you ever written any kind of program before? If so, in what language?

Do you know what standard-input and standard-output streams are (stdin, stdout)?
chown33 is offline   0 Reply With Quote
Old Apr 19, 2011, 09:51 PM   #3
macguin
Thread Starter
macrumors newbie
 
Join Date: Jul 2009
Quote:
Originally Posted by chown33 View Post
Have you ever written any kind of program before? If so, in what language?

Do you know what standard-input and standard-output streams are (stdin, stdout)?
I have written several iPhone apps, so obviously objective c. Also Java and C++.
Also applescript, but I personally don't consider it a real programming language.

I have no experience with standard-input and standard-output (no idea what it means)

Last edited by macguin; Apr 19, 2011 at 10:00 PM.
macguin is offline   0 Reply With Quote
Old Apr 20, 2011, 12:36 PM   #4
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
This might be what you want:

http://cocoadevcentral.com/articles/000025.php
http://cocoadevcentral.com/articles/000031.php

Otherwise you'll have to see if the developer of Minecraft has any sort of IPC support.
Mac_Max is offline   0 Reply With Quote
Old Apr 20, 2011, 01:00 PM   #5
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by macguin View Post
I have no experience with standard-input and standard-output (no idea what it means)
Then you will need to do some research before attempting to write your GUI front-end.

Have you written any Java code that uses Runtime.exec() to run another program? If so, you may have used the Process's inputStream, outputStream, and errorStream to get data from the process, send data to the process, or read the error message from the process. All three streams are the "standard" streams of the child process: stdin, stdout, stderr (their C symbol names when using stdio.h).

In a Java program, the System.in, System.out, and System.err streams are that process's stdin, stdout, and stderr streams.

In a shell command, < redirects stdin to a file, > redirects stdout, and 2> redirects stderr.

In a shell pipeline, such as cat fee fie foo | sort, the stdout of the cat process is connected to the stdin of the sort process by a pipe (see: man 2 pipe). Both processes run concurrently. sort will wait for input, and cat will wait for its stdout pipe buffer to drain, so the processes never outrun one another nor are they starved for data.
chown33 is offline   0 Reply With Quote
Old Apr 20, 2011, 03:13 PM   #6
macguin
Thread Starter
macrumors newbie
 
Join Date: Jul 2009
Quote:
Originally Posted by Mac_Max View Post
This might be what you want:

http://cocoadevcentral.com/articles/000025.php
http://cocoadevcentral.com/articles/000031.php

Otherwise you'll have to see if the developer of Minecraft has any sort of IPC support.
How do I set the launch path for the NSTask to the minecraft_server.jar?

Last edited by macguin; Apr 20, 2011 at 03:28 PM.
macguin is offline   0 Reply With Quote
Old Apr 20, 2011, 03:47 PM   #7
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by macguin View Post
How do I set the launch path for the NSTask to the minecraft_server.jar?
You don't. The launch path should be the 'java' command, which is responsible for running the Java classes in the jar.

You'll need to know the full path of the java command, so in a Terminal window, enter this command:
Code:
which java
The path it tells you is a standardized location, but I'm telling you how to do this so you know it for other commands.

You'll also need to read the man page for the java command, so you know how to tell it that the minecraft_server.jar is a jar-file and not a class, a defined system property, or some other parameter.
chown33 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
OS X: 2010 Mac Mini Server ok as Minecraft Server voigtstr Mac and PC Games 3 Jan 29, 2014 08:15 AM
Minecraft server SawyerTHEBEST PowerPC Macs 1 Jun 7, 2013 01:26 PM
How to make a Minecraft Server? ideal.dreams OS X 10.8 Mountain Lion 0 Apr 5, 2013 05:34 PM
OS-neutral: Minecraft name and server ip aPple nErd Mac and PC Games 0 Mar 17, 2013 07:36 PM
Anyone have a Minecraft server? PhazonUK Mac and PC Games 3 Jul 7, 2012 08:24 AM

Forum Jump

All times are GMT -5. The time now is 07:08 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC