• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Java

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Frodo Baggins

New Member
Joined
Aug 29, 2001
Location
City of Dreaming Spires
I have a program in java (very small code) that I want to be able to run standalone without compiling on a different computer (Running Windoes 95 or 98). How can I do this? Is there a way to compile my program into .exe format that can run without the java stuff?
 
I have a small program and I need someone to compile it into .exe format for me. I've tried to download a compiler called Excelsior JET to do it (It took me helluva long on 33.6k to d/l) but it gives me error when installing.

Would someone be available?
 
Maybe you can put gcc on a Windows box and try using gcj to compile a native binary.
 
use javac and java command

where do you get it ???

java.sun.com

of course, download your free copy jsee 1.4
 
It's not for me. It's for some friends of mine that have no idea how to type in dos, much less use the javac or java command.

if anybody could compile this really short java file into an exe, I would really be grateful:
Code:
import java.io.*;

public class SRem 
{
	public static void main(String[] args) throws IOException 
	{
		File inputFile = new File("input.txt");
		File outputFile = new File("output.txt");
		
		FileReader in = new FileReader(inputFile);
		FileWriter out = new FileWriter(outputFile);
		int c;
		
		while ((c = in.read()) != -1)
		{
			if(c != 32)
				out.write(c);
		}
		
		in.close();
		out.close();
	}
}
 
javac does not create native executables; it can only compile java source to bytecode, which requires the java virtual machine to run.

You might want to check out some of these links, they look relevant:
http://www.google.com/search?hl=en&...+java+to+native+executable&btnG=Google+Search

IIRC, there are tools to translate java source into C. If I can find one of those, I may be able to produce a win32 executable for you. I'll look around and get back to you if I find anything.

Good luck.
 
Back