Questions tagged [mainclass]

92 questions
0
votes
2 answers

Error Creating global CheckBox and using it in a method

I am trying to make that CheckBox object global in order not to creat it's findViewByid in methodes many times and it gives FC in the app and in logcat says that the line of creating the CheckBox is the line having the error and here is it's class…
Dasser Basyouni
  • 3,142
  • 5
  • 26
  • 50
0
votes
2 answers

IntelliJ Main Class Error

I am receiving an error that states that I need to specify a main class. As I am new to Java and IntelliJ I do not know what to specify. Here is an example that I am working on: public class Grades { public static void main(String[] args) …
0
votes
1 answer

how to test actor is main class with testkit in scala

I have started writing test for scala actor. I read this blog. http://blog.matthieuguillermin.fr/2013/06/akka-testing-your-actors/ Then I started. I wrote Application Actor. But I realized the application actor which is different others are in blog.…
Burak Dağlı
  • 512
  • 2
  • 10
  • 33
0
votes
2 answers

Main method not found in runnable jar (Eclipse)

I've been programming in java for a few months now and I decided to make an Atari breakout style game. I am now finished with the game and want to make it a runnable jar file in Eclipse so I went to File -> Export -> Runnable JAR File. Under Launch…
Matt32
  • 26
  • 4
0
votes
0 answers

What to fill into main class in Intellij to pack all the examples into one jar?

I'm trying to build a jar with Intellij, it requires a main class. The example I am using is storm-starter. I want to pack all the examples to this jar. What should I fill to main class so that I can pack all the examples into one jar?
Vimos
  • 691
  • 1
  • 9
  • 23
0
votes
4 answers

c# Main Class include "subclass"

Hey I have two classes class Main { public exLog exLog; public Main() { } } and class exLog { public exLog() { } public exLog(String where) { } public exLog(String where, String message) { …
Noel Schenk
  • 724
  • 1
  • 8
  • 19
0
votes
1 answer

Javafx code- main class error?

The following is my Javafx code. It doesn't work properly and it seems to be an error with the main class not being found. When I run it as a Java file, I get the error "Error: Could not find or load main class assignment_11.Assignment_11". When I…
rivkyb52
  • 3
  • 2
0
votes
1 answer

Problems with executing code in Eclipse

I was trying to execute the hello world code in Eclipse by writing main(String[]) : void in main class, but it said Error: Could not find or load main class main(String[]) : void.
0
votes
1 answer

How java finds entry point in multiple jars specified with -classpath option

This is been troubling me for a long time. In Linux, I see a process cmdLine is like below…
sandejai
  • 931
  • 1
  • 15
  • 22
0
votes
2 answers

How does Webstart determine the main class?

I have a jar file with two main classes. Depending on what I need I can run one or the other. To have this application run via webstart I created two JNLP files, each of them referencing one of the two main classes. It is mindboggling to see that…
Queeg
  • 7,748
  • 1
  • 16
  • 42
0
votes
1 answer

How to resolve jenkins maven error 'Could not find main class'?

Jenkins fails running maven at all with Parsing POMs [workspace] $ java -Xmx1500m or -XX:MaxPermSize=250m -cp…
jan
  • 2,741
  • 4
  • 35
  • 56
0
votes
5 answers

Call main method in a JButton

I would like to know, how to call the main method as it is in a JButton into a JFrame with an action performed, i mean, just press Compare Button & execute the code from main class (Main class is separate from JFrame code). public static void…
man
  • 35
  • 9
0
votes
6 answers

What "ClassName objectName;" does before the main method?

In this code I see the following lines before the "main" method: JTextArea displayArea; JTextField typingArea; I wonder what these lines do and when they are executed. As far as I know the "main" method is the "entry point". So, the code will be…
Roman
  • 124,451
  • 167
  • 349
  • 456
0
votes
1 answer

JFrame method prob

I am currently developing a small text-based game, and I keep getting an error... I don't know how to fix it, since its my first time using JFrame. The problem is, when I make the ButtonDemo method into ButtonDemo(), not public static void…
ensj
  • 33
  • 4
0
votes
1 answer

Trying to add image to JButton using get scaled instance

i am getting an error telling me that non static method addComponents ToPane(container) cannot be referenced from a static context. i've just started programming just over two months so please bear with me. package prototype; import static…
Reynolds
  • 9
  • 5