Questions tagged [mainclass]

92 questions
0
votes
1 answer

When I try to run my GUI on netbeans it says that there are no available classes what can I do about that?

When I run my GUI on netbeans a little window pops up saying "available classes:" but there aren't any when there clearly is a class and it has a main. Could you please help me. public class connectFour extends javax.swing.JFrame { public…
0
votes
2 answers

How do I create a switch-statement in my main class that when that case is selected will run another main class in my program?

I have multiple classes such as customer, customers, employee, employees, product, products. The programs with 's' are main classes. I have one Main class, I want this to be the start point of the program. I'd like a switch-statement in it. I'd like…
user1999
  • 93
  • 8
0
votes
1 answer

Is it possible in C# to inherit a subclass from a subclass?

I’m studying OOP at the moment, and I’ve got this thesis. Because I know that inheriting a subclass from a superclass be like: class superClass : subClass{ } but I’m curious if this is an acceptable form: class superClass : subClass1 : subclass2. In…
0
votes
2 answers

accessing a list from a static method in main class, in another method of different class in java

I have a question which may sound as basic question to experts. But I not an expert in java. So I am not knowing and unable to find much details also in google regarding this. Hope someone can help me out. I want to access one List from a method…
Priya
  • 329
  • 3
  • 14
0
votes
2 answers

No main class found

Language: Java Program: Connecting to a database Question: I'm trying to connect the sqlite database by following TutorialsPoint tutorial but I keep getting the main class not found error. Implementation: My code is below followed by my terminal…
user4544501
0
votes
1 answer

Jar File - main class not found

So I have the following project Structure: I have a package called "com.github.liketechnik". My main class is Build in this package ("com.github.liketechnik.Build"). I programmatically put the compiled classes from there into a jar file with a…
liketechnik
  • 104
  • 5
0
votes
0 answers

Can't find main class in Maven generated project

I'm using Acceleo to create a maven project which creates a .jar app... I have a "generate.mtl" file, calling other .mtl files one of which is the following genPOM.mtl [comment encoding = UTF-8 /] [module…
T. Kofidis
  • 57
  • 6
0
votes
1 answer

Failed to load main-class manifest attribute

I created a simple applet to run on a web browser. i create Jar file by running "C:\Program Files\Java\jdk1.6.0_21\bin\jar" cfv Project7Applet.jar *.class in a command prompt and then when i try to run the jar file i get the "failed to load…
Mike
  • 1
  • 1
  • 2
0
votes
1 answer

IntelliJ: How to use a main class which is not inside my Project Folder

I want to run a Project in IntelliJ, with a main class which is not inside my project folder. When I click the three dots to the right of the input, I can find this class (outside my project folder). However, once I run the project I get an error:…
CrazySynthax
  • 13,662
  • 34
  • 99
  • 183
0
votes
0 answers

Could not find or load main class TxtToCsvConverter.data_preprocess

The code is like this: public class TxtToCsvConverter{ private static final String DATA_FILE_NAME = "/Desktop/ml-1m/movies.dat"; public static void main(String[] args) { StringBuilder bulider = new StringBuilder(); try{ // Open…
Simon Chang
  • 69
  • 2
  • 9
0
votes
1 answer

Main class not found Java program

I thought i added my main code in this program but it did not recognize. Am I missing it? I get the error paint.Paintbrush class wasn't found in PaintBrush project. I'm not sure where I can include the main class in the beginning without getting an…
Olive Bassey
  • 37
  • 1
  • 2
  • 9
0
votes
1 answer

Runnable JAR File: Classes that implement "org.apache.hadoop.util.Tool" are not found

I have a project called MyTest. It has three classes: The first class implements the Tool interface (this is the class that is causing the problem) for simplicity I did empty implementations: import org.apache.hadoop.conf.Configured; import…
Mosab Shaheen
  • 1,114
  • 10
  • 25
0
votes
1 answer

Is there any "SpringBoot way" so i can start different Main Classes Applications from the same Jar File?

I Mean, that i DON´T want to create a Centralizer Main Class and pass parameter to it, so it can choose and start the @SpringBoot class for me... In the other hand, I do not consider starting the classes with "java -cp ". This way it is not…
0
votes
0 answers

Netbeans could not find main class

So my code worked yesterday but after building and cleaning it, it no longer works. Netbeans says it is unable to find and load the main class. I have not changed any of the code since running it yesterday, so the code isn't the problem. I have…
0
votes
1 answer

could not find text file, java file I/O error

not sure why this won't read my txt file saved in the same directory. it compiled just fine but then when i enter java BlindfoldsAside into the cmd ln, it says it cannot find or load my main class BlindfoldsAside. The case is all correct as far as I…