Linked Questions
23 questions linked to/from How to execute a java .class from the command line
1
vote
2
answers
492
views
Run selenium standalone script via cmd [duplicate]
I am facing an using in automation. I just want to execute selenium script, which I wrote in eclipse via cmd. I haven't used testng or anything else.
public class claim {
public static void main(...
-5
votes
1
answer
282
views
Finding Main Class in "Hello World" program in Java [duplicate]
I have a seemingly simple program in Java, but when I run it, I get the error:
Error: Could not find or load main class
Here is my code.
public class HelloPrinter
{
public static void main(...
0
votes
2
answers
201
views
Custom Command for command line for invoking java class [duplicate]
I would like to make a custom command, which can invoke my java class. I am not sure how to proceed with it.
I don't want to use java < classname> instead I want to create a custom command say ...
0
votes
1
answer
141
views
My command javac does not show any result [duplicate]
I can see the version of my java site as well as javac:
➜ intro java --version
openjdk 13.0.2 2020年01月14日
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed ...
1
vote
0
answers
93
views
How to remove the java error "Class not found or loaded"? [duplicate]
I have written a code snippet below and have saved it as Exerciselb.java and its compiled properly but its not executing
Snippet:
class Exerciselb {
public static void main(String[] args){
...
44
votes
5
answers
123k
views
Running java in package from command line
I have read the previously posted questions. Some are vague and none solved my problem so I am forced to ask again.
I have two simple classes,
package One;
import One.Inner.MyFrame;
public class ...
7
votes
2
answers
24k
views
How do I run a main method in a Java Gradle project from command line?
I have a Gradle project (say, MyProject) that has a main method that I only want to use to run a small Java app. Say, the script is in a class and package as follows:
MyScript.Java
package com.car....
4
votes
3
answers
6k
views
Running Java program from Python
I've looked here, here, here, and here.
While informative they just didn't quite have enough for me to discover the root of my problem. My code isn't contained within a JAR file and the customer has ...
2
votes
1
answer
7k
views
How do I need to run maven file in powershell?
I assume that additional dependencies are needed, but I can not understand exactly what. I appreciate everyone's help.
My pom file is:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:...
-1
votes
3
answers
14k
views
Command Prompt: java file not found [closed]
The file name is BookDemo.java and I compiled it like this: javac bookpack\BookDemo.java
This is my block of code:
package bookpack;
class Book {
private String title;
private String author; ...
1
vote
1
answer
5k
views
Maven: using command line to run a java class file [duplicate]
I have a java project build using Maven "quickstart" template. The structure looks like
src
main
java
myapp
HelloWorld.java
The HelloWorld.java is declared to be under package "...
1
vote
2
answers
10k
views
Implementing Java API Sample Code
I am looking into IBM's quickfile API. Now I am a front-end developer and I do not know much about Java.
I would like to know how I can implement some of the sample code they provide on the ...
0
votes
1
answer
4k
views
Running Java class on mac terminal-- Error: Could not find or load main class Types
I'm very new to Java; and have only self learned the basic java class. Now I'm studying the inheritance part; here is the sample code I got from online.
I have my code on my sublime, then I compile ...
2
votes
2
answers
364
views
error in java basic test program
$cat JarTest.java
package edu.testjava.simple;
public class JarTest
{
public static void main(String args[])
{
System.out.println("Hello World\n");
}
}
$javac JarTest.java
$...
xyz's user avatar
- 8,987
0
votes
1
answer
997
views
java JDK 1.8.0 Win 11 - system variables
I've just istalled JDK8 on PC Windows 11 Home
Now im trying to run simple default program from NetBeans14
In environmental variables:
PATH : C:\Program Files\Java\jdk1.8.0_202\bin
CLASSPATH : C:\...