3,119 questions
0
votes
1
answer
68
views
Run time error related to main method error
I'm currently studying Java in general and inheritance in particular.
When I run the code below in an online editor it throws an error related to the main method, however, when I modify it as ...
0
votes
0
answers
50
views
Why does changing entry function of my C application is causing SIGSEGV [duplicate]
I am trying to understand the entry point _start of a random C application which i had written, i wanted it to change to a different function so i changed it using the compiler flag while compiling my ...
-4
votes
1
answer
101
views
Need for encapsulating main() [closed]
Since main() is made static so that JVM can access it without creating an object of the class in which it is defined, then what is the need for writing it in a class?
0
votes
1
answer
324
views
invalid command name 'main:app' when I execute "uvicorn main:app --reload" [duplicate]
When I try to execute the command uvicorn main:app --reloadfor start my local server, the VSCode terminal throws the error invalid command name 'main:app'. The code below imports a variable from the ...
0
votes
0
answers
62
views
How to resolve "Entry point Not Found" in release mode
I am developing one DLL in VC++ and its working while testing with my Test.exe app in debug mode. But while running Test.exe in release mode I am getting "Entry point Not Found" error
While ...
0
votes
0
answers
80
views
Best approach for displaying license activation dialog
I have a text editor, now I'm implementing licensing support. Licenses are managed on a third-party server (SAAS).
Desired Flow
The user opens the editor.
If they have no license (first-time open):
...
0
votes
0
answers
69
views
Python GUI runs separate scripts through subprocess calls, but doesn't work when packaged as .exe
I have an interface I've created called interface.py that runs a script based on the press of a button...
def submit_action(selected_item):
values = list(item_to_value[selected_item])
...
0
votes
1
answer
93
views
Should Portable Types Be Used in the Declaration of a Main Function? (C11)
This question came to me last night, and I couldn't find a definitive answer in my brief surf of Google. Should (or could) I use portable types (i.e int32_t) in the declaration of my program's main ...
1
vote
1
answer
73
views
Scala Future strange behavior
What's wrong with this code? Why I can see only one output? What returns futureUserByName function? onComplete doesn't work for it as well. It must be just simple Future, but it doesn't work.
import ...
-2
votes
2
answers
109
views
LINK2001,and LINK1120 errors visual studio 2022 CLR empty project
i am currently working on a web browser on visual studio 2022 and every time I execute the program these errors show up LINK2001 unresolved external symbol main and LINK1120 1 unresolved externals.
So ...
1
vote
1
answer
72
views
Where am I initializing my main class twice?
I'm receiving the error Plugin already initialized!. I already know that this means that I'm initializing my main class twice and Bukkit/Spigot doesn't like this.
I cannot seem to figure out where I'm ...
0
votes
1
answer
413
views
In IntelliJ(2024.1.1) with the Scala Plugin(2024.1.20), Main.main is Failing with "Could not find or load main class org.public_domain.main"
UPDATE:
Nestled deep within the large accepted answer is the way to fix this; i.e. rename the method from main to something else, or rename the object Main to something else.
The conflict is a case ...
0
votes
2
answers
26
views
Android - can i add EditText value to the android:text row of a TextView in activity_main and have it concatenate?
<EditText
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_margin="20dp"
android:...
0
votes
1
answer
3k
views
dotnet new console --use-program-main does not work
when you are in VS Code you start a new console, the program code generated has the new format where there is no main() section as in the old days. I like have the main() section. I should be able ...
0
votes
1
answer
129
views
How to fix error and what causes: Error: Main method is not static in class
I am getting this error:
Error: Main method is not static in class oracle.Execution$, please define the main method as:
public static void main(String[] args)
When I run the command:
java -jar ...
0
votes
2
answers
749
views
Maven java.lang.ClassNotFoundException: Could not find or load main class
I have a problem with my Maven project. The program was already running without any problem but now I can't start it anymore. It is important that the user can run this application by just double ...
0
votes
0
answers
89
views
Electron renderer not communicating with main process
I have a small html on top of my electron app which has a input. I want to make it so that when i insert a url into it and press enter, url in my second BrowserView changes and loads that website. ...
0
votes
1
answer
60
views
Python main() does not recognize returned value
1- I get this error when I try to print a return value from inside main => " name 'conversion' is not defined "
2- I have some dummy prints to debug my code
def main():
time = input(&...
2
votes
2
answers
1k
views
How to enable auto-generating main method when creating console application in VS Code in C#
In .NET 6.0, the Main method is simplified by removing and main method. Now it's possible to start writing code directly without it.
But I want to enable it back and don't want to write it by hand ...
0
votes
1
answer
2k
views
Problem with "java.lang.reflect.InvocationTargetException"
I am very new to this and I have a problem with this message that I get every time I try to run a program. I've tried a thousand things and I don't know what else to do. If anyone could help me I ...
0
votes
1
answer
2k
views
VB.net BC30738 'Sub Main' is declared more than once in <application> My.MyApplication.Main(args As String())
Solved this issue and posting to help future readers. This happened when switching a Windows Forms App to start with my own Main() instead of a form. After experimenting with many different ways of ...
1
vote
1
answer
1k
views
How to return a string as an error from main()?
Been trying to write a function just to do this.
fn main() -> Result<i32, i32> {
let clargs: Vec<String> = env::args().collect();
// validate command line arguments
if ...
0
votes
0
answers
108
views
Get MainWindow Instance WPF
I have some custom extensions, which when i double-click on it, it launch program and every time as i do it, it creates new mainwindow. So i want not create, but update the first mainwindow. I searced ...
3
votes
1
answer
122
views
What kind of entity does the Main Class in Java represent? [duplicate]
Whenever we see an introduction to Object Oriented Programming, we commonly come across this explanation, A class is a blueprint of an object, it can be used to represent a real world entity virtually,...
0
votes
1
answer
60
views
CPLEX inserting results to Excel Sheet in main method
I am creating a project where I have one model where one variable is always changing, namely ForecastMultiplier. I need to put the results of each iteration into an excel spreadsheet.
You can find ...