Questions tagged [mainclass]
92 questions
0
votes
1 answer
running a JApplet in eclipse
I'm not putting this in a browser or anything, I simply want to run this in eclipse as an applet, however, I'm not succeeding at all. I'll first post the code, and then I'll post solutions I've tried by commenting out certain things (i.e.…

jeffrey zachary
- 91
- 1
- 9
0
votes
1 answer
JFrame not appearing
I'm writing a simple-ish program to look up movie information, and I'm having a bit of an issue making the GUI appear.
I appreciate any help anyone might be able to offer.
package guiprojj;
import java.io.BufferedReader;
import…

Eric Lang
- 274
- 1
- 2
- 16
0
votes
1 answer
Error: Cannot find or load main class only when running outside of eclipse
I've made a Java application which runs fine inside of eclipse
problem is, when I export it as a jar file and then attempt to run that jar file via windows cmd(current directory is the same as that of where I exported) with java "2Dwars 2.0.jar"
it…

Caelum
- 801
- 2
- 10
- 19
0
votes
1 answer
appassembler-maven-plugin JSW - How to set wrapper-java-mainclass
i try to use the appassembler-maven-plugin to ease the use of the Java-Service-Wrapper
My Setup is as follows:
implemented a class MyServiceWrapper which extends WrapperListner from JSW to have full access to the…

Nikolai
- 25
- 1
- 5
0
votes
3 answers
eclipse for Java NoClassDefFound error on main entry point - package, project and class are the same
Trying to create a windows executable but always get error on Exception in thread main java.lang.NoClassDefFoundError. I've read all the other responses but so far my issue remains the same.
I have a class file called testproject that has a main…
-1
votes
1 answer
Class not found Java
I created artifacts and when starting the program I get the error Class com.abstudio.fakture.MainActivity not found.
When I run a program through the IDE it does everything right.
IDE: Intelij IDEA
JavaFX
Java 8
Manifest file:
Manifest-Version:…

Armin Brkić
- 21
- 2
-1
votes
2 answers
Unable to find a suitable main class, please add a 'mainClass' property -> [Help 1] [ERROR]
I've got a new project from spring boot initializer, the first run he work fine, but the next run i have this error : please add a mainClass,
The project is a spring boot application with kotlin and spring web.
The main class is in the project and i…

mjedli
- 1
- 2
-1
votes
1 answer
how to get the date from a class to the test class
here is what i have to do, and what I have already did
After a quick meeting with the head of the company, you got the following information:
It is required to store the whole data in one collection
Each flight has a number, a pilot and a specific…

HoLee
- 1
- 4
-1
votes
1 answer
I don't understand why I get the error message: Error: Could not find or load main class World Caused by: java.lang.ClassNotFoundException: World
import java.util.Scanner;
public class World {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
System.out.println("Hello. What is your name? ");
String input = scnr.next();
…

vadose
- 1
- 1
-1
votes
2 answers
In Java, where do I find the class of execution at run time if no main class/method is used?
I am trying to find where the entry point is of a large application, but I was told that it doesn't use a main class. I'm able to run and build the application, and I know that the classes and methods are executing when I make small…

Tiffany
- 103
- 5
-1
votes
1 answer
cannot find or load main class
import java.sql.*;
class TestingDatabase
{
public static void main(String args[])
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn =…

WePull Washney
- 15
- 4
-1
votes
1 answer
Could not find or load main class FaceDetect in java with angus.ai
I get the following error when I try to run
java -cp 'angus-sdk-java-0.0.2-jar-with-dependencies.jar:.' FaceDetect
I am following a tutorial for face detection in http://angus-doc.readthedocs.io/en/latest/getting-started/java.html . Below is my…

shamila
- 1,280
- 6
- 20
- 45
-1
votes
1 answer
Java can't find main class in JApplet
I wrote a JApplet program in Java.
Now when I Run the program it tells me that the class wasn't found in project.
Here is the code I wrote:
package assignment1q6.pkg1;
import javax.swing.JApplet;
import java.awt.Graphics;
public class…

Evert Van Eeden
- 17
- 1
- 1
- 6
-1
votes
2 answers
My JLabel/Button Counter doesnt work
I got a little JLabel Counter Program here which basically just should add a Number to a Counter when i press "+1" but when i try to run it it say that it isnt able to find the Main Class in my tCounter.ButtonAction class here's my Code so far hope…
-1
votes
2 answers
Java-Checking for main class
I had a problem in one of my java products, in which players would run a cheat class as the main class. Is there a way in which I can check for the main class running? I've tried adding a UID but they seemed to get past it.

Mr. Charles
- 1
- 3