Original Post
I quickly threw together a simple program to test the animation frames that my friend is making for our game, not too polished but none of the code will be used again. As far as I can tell it works properly, when run in the IDE (I'm using code warrior by the way) it gives an exception as expected (since the file it loads doesn't exist). So it works fine.
The problem is I'm not sure how to turn it into a program I can run. I found a command called "build" near compile. It seems to be the right one. Ok so I use it and it makes a .JAR file. If I go double click on the jar the hour glass comes up for about a second and then disappears. I cannot seem to get jar files to do anything. I might have something set up wrong, not sure. I found a menu where I can change what it makes.
If I choose application I get a .zip file, which is also useless. It just opens up the unzipper and shows me a .class file. If I double click on the .class file it opens up my IDE and says something about the debugger and then basically nothing happens. If I choose class folder it makes a folder with the class file in it, also basically useless.
So after doing all that I went to the sun site and learned how to do it with the console. I got to where the .java file was and typed: c:\jdk1.3\bin\javac AnimationTester.java and it worked, I got the .class file. Then I tried c:\jdk1.3\bin\java AnimationTester and this time it gave me an error: something like ClassDefNotFound. I tried it some more, with different options and then I tried all the same things in the IDE but it always gave me that, or sometimes a popup window saying that it couldn't fine AnimationTester, the error messages were all pretty much the same. I tried changing the .class filetype to automatically run c:\jdk1.3\bin\java but that also gave the same error.
I don't think it is my code causing the problem but here it is in case (the update() method was taken from a sun tutorial) thanks
import java.awt.*;
import javax.swing.*;
import java.awt.image.*;
import java.io.*;
public class AnimationTester extends JFrame implements Runnable
{
public static void main(String args[]) throws IOException
{
AnimationTester at = new AnimationTester();
at.show();
new Thread(at).start();
}
Toolkit tk;
int frame;
int delay;
int distance;
Image tile;
Image[] upFrame;
Image[] downFrame;
Image[] leftFrame;
Image[] rightFrame;
public AnimationTester() throws IOException
{
super("Animation Tester");
setSize(600,600);
tk = Toolkit.getDefaultToolkit();
frame = 0;
delay = 150;
loadFiles();
}
void loadFiles() throws IOException
{
BufferedReader buffer = new BufferedReader(new FileReader(new File("settings.txt")));
delay = Integer.parseInt(buffer.readLine(),10);
distance = Integer.parseInt(buffer.readLine(),10);
upFrame = new Image[Integer.parseInt(buffer.readLine(),10)];
for(int i=0; i = tk.getImage(buffer.readLine());
downFrame = new Image[Integer.parseInt(buffer.readLine(),10)];
for(int i=0; i
hmm not sure how to fix this, the pre tags turned into code tags, sorry about the word wrap
Edited by - pleaseHelpMe on 10/20/00 12:17:12 AM