954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Textpad issues. Need help asap.

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
		try
		{
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");

		}
		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.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		f.setSize(450,300);
		f.setTitle("Crandall Power and Light Customer Payments");
		f.setResizable(false);
		f.setLocation(200,200);
		f.setVisible(true);
	}

	public BillPayer()
	{
	}

	public void actionPerformed(ActionEvent e)
	{
	}
}
[\java]
neemo6
Newbie Poster
10 posts since Dec 2010
Reputation Points: 10
Solved Threads: 1
 

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.

Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You