?
Solved

Configure Java with jcreator

Posted on 2003-03-22
11
Medium Priority
?
2,444 Views
Last Modified: 2013-12-14
Hi,
    I am trying to configure my java using Jcreator. I cant firure it out but this is what comes up when i go to compile it. Mabey someone can help me.

--------------------Configuration: j2re1.4.0 <Default>--------------------
Invalid command line. Error : Invalid path

Command   : "C:\Program Files\Java\j2re1.4.0\bin\javac.exe" -classpath "C:\Program Files\Java\bin" -d "C:\Program Files\Java\bin" "C:\Program Files\Java\bin\CounterUpDown.java"
Directory : C:\Program Files\Java\bin
0
Comment
Question by:neocytrix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 8188962
> C:\Program Files\Java\j2re1.4.0\bin\javac.exe

javac is not a part of the jre.
It is part of the jdk.
0
 

Author Comment

by:neocytrix
ID: 8189611
Where can i download the JDK I only see the JRE and SDK at java.sun.com
0
 

Author Comment

by:neocytrix
ID: 8189620
ok I figured that part out i just put in the SDK and it compiled fine. But now i go to run it and the command prompt comes up with this

Exception in thread "main" java.lang.NoSuchMethodError: main
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:neocytrix
ID: 8189817
ok I figured that part out i just put in the SDK and it compiled fine. But now i go to run it and the command prompt comes up with this

Exception in thread "main" java.lang.NoSuchMethodError: main
0
 
LVL 35

Expert Comment

by:girionis
ID: 8189954
 Are you sure your application contains a "main" method?
0
 

Author Comment

by:neocytrix
ID: 8190017
Ok i got the applet veiver to come up. but i can see the applet. it just says

Dispose: applet not distroyed

this is the source code if anyone can find anything wrong with it

import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;

public class CounterUpDown
  extends Applet
  implements ActionListener
{  
  private Button upButton = new Button("+1");
  private Button downButton = new Button("-1");
  private int counter = 0;
 
  public void init() {
    add(downButton);
    add(upButton);
    downButton.addActionListener(this);
    upButton.addActionListener(this);
  } // init
 
  public void paint(Graphics g) {
    g.drawString("Count: "+counter, 70, 50);
  }// paint
 
  public void actionPerformed(ActionEvent e) {
    // Might be a "-1" or a "+1" button click
    // Check the event's "source" and act accordingly
    if (e.getSource() == downButton) {
      counter = counter-1;
    }
    else {
      // Must be upButton
      counter = counter+1;
    }
    repaint();
  } // actionPerformed
 
} // class CounterUpDown
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 100 total points
ID: 8190225
 So it is an applet that's why it couldn't find a main method. Try to run it from the command promptp and see if you can run it. If your HTML file that runs the applet is called "MyFile.html" run it by using\; appletviewer MyFile.html

  Also a good tutorial on JCreator can be found here: http://www.javaworld.com/javaworld/jw-11-2002/jw-1101-java101.html
0
 

Expert Comment

by:CleanupPing
ID: 9058534
neocytrix:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9730802
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between objects and girionis.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0
 
LVL 35

Expert Comment

by:girionis
ID: 9731217
 I agree :)
0

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question