Musical Floppy Drives

Fri Jan 27 2017



Top Three recommended Java IDEs

Fri May 29 2015

An IDE (Integrated Development Environment) is a single program that wraps everything you need to program with. An IDE usually consists of a code editor, debugger, and a compiler. A good IDE can make you more productive. Without a IDE you would be stuck writing all of your apps in notepad and compiling via command line – which is not bad for learning how to program. A good IDE has syntax highlighting which makes the code easier to read and error highlighting which makes finding that missing semi colon easier. Here is a list of three IDEs that work well for me.

1 NetBeans

NetBeans is the most productive IDE for large java projects. NetBeans is great at detecting errors in your code. You can also have multiple projects open in the same window which is great for anyone who is constantly flipping between projects – even if they are in different coding languages. This is a must have program for everyone looking to develop Java. This program also supports PHP, JavaScript and C/C++.

NetBeans IDE
NetBeans IDE

2 Eclipse



bash usr bin java cannot execute binary file

Fri May 29 2015

0.1 bash: /usr/bin/java: cannot execute binary file

When you get this error, it means that you are using the wrong version of JDK to run a specific java file. To fix this you must uninstall your current version of JDK. Next you must install the correct architecture of JDK. This for most people means install the 64-bit version of JDK.

undefined



Java Fibonacci Solver

Sun Apr 19 2015

The Fibonacci Sequence is a series of numbers where the next number is found by adding the previous two numbers.

Ex:

n 1 2 3 4 5 6
x 1 1 2 3 5 8
class Fibonacci
{
   public static void main(String[] args)
   {
       for(int i = 1; i < 60; i ++)
       {
               System.out.println("Fibonacci " + i + " is: t" + fib(i));
       }
   }

   //recursive definition of Fibonacci
   public static double fib(int n)
   {
       if(n == 1 \|\| n == 2)
       {
           return(1);
       }
       return(fib(n -1) + fib(n -2));
   }
}
Output in terminal
Output in terminal



Batch Minecraft Launcher with Auto Restart

Sat Apr 18 2015


@echo off

color a

title server Name

 

:startServer

echo starting server

echo (%time%)

java -Xmx1024M -jar caftbukkit.jar -o true

 

echo (%time%) WARNING: Minecraft server closed or crashed, restarting

ping 127.0.0.1 -n 5

goto startServer

This batch script great for Minecraft servers which frequently crash – for whatever reason. If you want to learn more about how this script works I would recommend that you look up a batch tutorial online. This script is just a big loop which restarts whenever the server crashes. If you like to use this, just copy and paste it into a batch file (ends with .bat) and make sure that it is in the same directory as your Minecraft server. Also, the “craftbukkit.jar” should be the name of the jar file that you use to run your server.

Happy mining.