Well I just got a new latop with windows 7 and downloaded textpad 5 to do my java homework. At first I had issues just trying to compile but then found out that i needed to point textpad to javac.exe for it to compile. Now my problem is i cant get the program to run, albeit the program is not complete it should at least display an empty window. I keep getting an error "Could not find or load main class ...." tool completed with exit code 1. I have the latest Java SE jdk and jre. I tried to point textpad to java.exe to run the program but this is not working. Please I need help as homework is due on Friday the 16th.

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
import java.util.*;

public class BillPayer extends JFrame implements ActionListener
	public static void main(String[] args)
		// set the look and feel of the interface

		catch(Exception e)
			JOptionPane.showMessageDialog(null,"The UIManager could not set the Look and Feel for this application.", "Error",JOptionPane.INFORMATION_MESSAGE);

		BillPayer f = new BillPayer();
		f.setTitle("Crandall Power and Light Customer Payments");

	public BillPayer()

	public void actionPerformed(ActionEvent e)

Edited 5 Years Ago by neemo6: n/a

I believe you need to include the path of the 'bin' java in your Window environment. This is not, by default, added when you install Java Development KIT. You should search on the Internet for how to edit environment variables for Window 7.

Edited 5 Years Ago by Taywin: n/a

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