# Java noob - help setting up eclipse

• Java
Hercuflea
Hello and thank you for putting up with this noob question.

The directions on the website or anything I have found on the internet are not very descriptive.

I have downloaded Eclipse and Java JDK version 7 and successfully installed both of the applications on my computer, but I must have missed something.

My code is perfect and has zero red lines, but when I try to run it I get this error:

"Error: Could not find or load main class org.eclipse.persistence.internal.libraries.asm.util.ASMifierClassVisitor"

I am not a computer programmer but I am just using what I have learned in my first computer science class to do a physics project. Please help me get this stupid program set up so I can have my project done by the due date.

## Answers and Replies

Homework Helper
Gold Member
Hello and thank you for putting up with this noob question.

The directions on the website or anything I have found on the internet are not very descriptive.

I have downloaded Eclipse and Java JDK version 7 and successfully installed both of the applications on my computer, but I must have missed something.

My code is perfect and has zero red lines, but when I try to run it I get this error:

"Error: Could not find or load main class org.eclipse.persistence.internal.libraries.asm.util.ASMifierClassVisitor"

I am not a computer programmer but I am just using what I have learned in my first computer science class to do a physics project. Please help me get this stupid program set up so I can have my project done by the due date.

I've never encountered that issue before. When you say that your code is "perfect", do you meanthat you can compile and run it from a shell without issue? If so, you may want to ask about your problem in Eclipse's newcomer forums (see here.

What OS are you using? What version of Eclipse? Can you post a screenshot of the error?

Hercuflea
Hello and thank you for the reply.

This code ran perfectly at my school so there is something wrong with how my computer is set up. It is a Windows 7, most recent version of eclipse (I clicked the one with the most downloads, I think EE), and Java JDK version 7.

Code:
public class PhysicsProject {
public static void EulerMethod(double angdegree) {
System.out.println("For angle: " + angdegree + " degrees.");

double theta = Math.toRadians(angdegree);
double vinx = (255) * Math.cos(theta);
double viny = (255) * Math.sin(theta);
final double deltat = .05;
final double g = 32;
final int increment = 208;

double[] vx = new double[increment];
double[] vy = new double[increment];
double[] xpos = new double[increment];
double[] ypos = new double[increment];

vx[0] = vinx;
vy[0] = viny;
xpos[0] = 0;
ypos[0] = 0;

for (int i = 1; i < vx.length; i++) {
vx[i] = vx[i - 1] + deltat * (-.25 * vx[i - 1] - .247 * vy[i - 1]);
vy[i] = vy[i - 1] + deltat * (-.25 * vy[i - 1] + .247 * vx[i - 1] - g);

}

for (int i = 1; i < xpos.length; i++) {
xpos[i] = xpos[i - 1] + deltat * vx[i - 1];
ypos[i] = ypos[i - 1] + deltat * vy[i - 1];

}
System.out.println("xpos");
for (int i = 0; i < xpos.length; i++) {
System.out.println(xpos[i]/3);
}

System.out.println();
System.out.println("ypos");
for (int i = 0; i < ypos.length; i++) {
System.out.println(ypos[i]/3);
}

}

public static void main(String[] args){
EulerMethod(4);
System.out.println();
EulerMethod(6);
System.out.println();
EulerMethod(8);
System.out.println();
EulerMethod(10);
System.out.println();
EulerMethod(12);
System.out.println();
EulerMethod(14);
System.out.println();
EulerMethod(16);
}
}

#### Attachments

• JavaError.jpg
24.1 KB · Views: 468
coalquay404
Your code compiles and runs fine here.

My guess is that when you made your new project in Eclipse, you probably selected the wrong project type. Typically, you'll want to use New Project -> Java Project, *not* any others since this may introduce dependencies that you haven't satisfied.

By the way, you're almost certainly not looking for Eclipse EE. Eclipse Classic or Eclipse for Java Developers are both more than sufficient for your needs.

Mentor
By the way, you're almost certainly not looking for Eclipse EE. Eclipse Classic or Eclipse for Java Developers are both more than sufficient for your needs.

I'm guessing that "EE" stands for Enterprise Edition.

Hercuflea
I think I might just uninstall eclipse and retry again.

Is there some process that I am missing when installing?

1: Install Eclipse
2: Install Java JDK (where does it go?, and can you do this from inside eclipse?)
3: Install Java documentation (where does it go?)
4: Start programming?

edit* The project type is a Java Project. So I really have no idea what's wrong.

Edgardo
Here is a youtube video that shows how to install Eclipse on Windows:

Last edited by a moderator:
Gold Member
Have you been able to compile any other Java program, or is this the first one?

Gold Member
Install the JDK FIRST and let it install at the default location. Make sure you get 64-bit or 32-bit correct if using Windows. Then, after that, try installing Eclipse. Go into Eclipse' settings afterwards and verify that it has found your version of Java. They try running Hello World first.