my program includes pictures and audio, do i have add that to my project and then create a jar file? or i just have to include the source file and that's it?

What exactly do I put there? The path of my main class?
Btw my entire program is in one class with multiple private classes inside. Would affect the fact that my jar file is not running?

Edited 5 Years Ago by plasticfood: n/a

yeah i was thinking that i was going to put the different classes into its own file, but i've been lazy..

ok so i converted my program to an applet and it runs perfectly. i am still unable to get the jar file running. does anybody have any clue or hint??

Edited 5 Years Ago by plasticfood: n/a

my code is kind of long, so i erased a ton of stuff, but some are self-explanatory.

import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.io.*;
import java.awt.image.BufferedImage;
import javax.imageio.*;
import java.applet.*;

public class WorkingTitle extends JFrame{

	public WorkingTitle(){
		super("Working Title");
		setSize(550,429);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		loadPictures();//load all pictures
		loadSounds();//load all sounds
		
		ps = new PaintScreen();//extends jpanel
		add(ps);
		
		start1 = new MovePlayer();//player movements
		start1.start();	
		start2 = new MoveBoat();//boat movements
		
		setVisible(true);
		
		addKeyListener(new ButtonListener());
		
	}
	
	private class PaintScreen extends JPanel{
		public void paintComponent(Graphics g){	
			super.paintComponent(g);
			//paint stuff
	}
	
	private class MoveBoat extends Thread{
		public void run(){
			while(true){
				try{
					repaint();
					Thread.sleep(40);
				}
				catch(Exception e){
					break;
				}
			}
			
		}
	}
	
	private class MovePlayer extends Thread{
		public void run(){
			while(true){
				try{
					repaint();
					Thread.sleep(40);
				}
				catch(Exception e){
					break;
				}
			}
			
		}
	}

	private class ButtonListener implements KeyListener{
			public void keyPressed(KeyEvent e){
				//key listener code 
			}
	}
	
	public static void main (String [] args)
	{
		WorkingTitle wt = new WorkingTitle();
	}


}

Manifest-Version: 1.0
Main-Class: WorkingTitle

and what do you mean by environment settings?

This article has been dead for over six months. Start a new discussion instead.