package com.arshajii.nbody.backend;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

// TEST
public class Main {
	public static void main(String[] args) throws IOException {
		Body sun = new StaticBody(new Vec(0, 0), new Vec(0, 0),
				Const.SOLAR_MASS);

		Body earth = new Body(new Vec(149_600_000_000d, 0),
				new Vec(0, 30_000d), 5.972E24);

		Body sun2 = new StaticBody(new Vec(0, -149_600_000_000d * 2), new Vec(
				0, 0), Const.SOLAR_MASS);

		Universe u = new Universe(new Body[] { sun, sun2, earth });

		PrintWriter w = new PrintWriter(new FileWriter("results.txt"));

		for (int i = 0; i < 365 * 2; i++) {
			u.print(w);
			u.step();
		}

		w.close();
	}
}

@@ -250,27 +250,8 @@
 0), 
-new Vec(0, 0),%0A%09%09%09%09
 Cons
@@ -301,25 +301,22 @@
  Vec(149
-_
 600
-_
 000
-_
 000d, 0)
@@ -316,21 +316,17 @@
 00d, 0),
-%0A%09%09%09%09
+ 
 new Vec(
@@ -334,16 +334,19 @@
 , 30
-_
 000d),
- 
+%0A%09%09%09%09
 5.97
@@ -401,17 +401,14 @@
 -149
-_
 600
-_
 000
-_
 000d
@@ -417,29 +417,13 @@
  2),
- new Vec(%0A%09%09%09%090, 0), 
+%0A%09%09%09%09
 Cons

Make Main Java 6 compliant.