Search:

Type: Posts; User: Amoranemix

Search: Search took 0.18 seconds.

  1. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    OK. Thanks for your help.
  2. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    OK, so I instructed
    C:\Users\Knarf\Documents\School\Informatica\Software Testing\IdeaProjects\HelloWorld2>java -jar HelloWorld2.jar

    Response :
    Error: Unable to access jarfile HelloWorld2.jar
    ...
  3. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    I have still the commend prompt window open, so I can copy the instruction I gave :
    C:\Users\Knarf\Documents\School\Informatica\Software...
  4. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    I’ll give it one more try.

    I am in
    C:\Users\Knarf\Documents\School\Informatica\Software Testing\IdeaProjects\HelloWorld2\out\production\HelloWorld2\MyPackage

    It contains
    29/08/2022 11:09 ...
  5. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    I still don’t know how to create a working standalone jar-file from my simple program using the JDK alone. Apparently that is overly complicated if you are not doing that frequently.

    So, I try it...
  6. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    In Windows Explorer Main.class file is the MyPackage folder.

    “The jar command needs to have the path to the class file like with the java command.”
    What class path with what java command?
    Other...
  7. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    This is the code from the Main class :

    package MyPackage;

    public class Main {

    public static void main(String[] args) {
    HelloWorldCreator hello = new HelloWorldCreator();

    ...
  8. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    Apparently my JRE is not installed correctly because when I double-click a jar file Windows asks me what I would like to open it with.

    The Pluralsight course also explained how one is supposed to...
  9. Replies
    18
    Views
    2,493

    Re: Cannot find class in .class or .jar file

    Thanks for your help.

    The folder in which I tried to run the classes is :
    C:\Users\Knarf\IdeaProjects\HelloWorld\src\com\example\helloworld
    That is where they are located.

    Indeed. Moving 3...
  10. Replies
    18
    Views
    2,493

    Cannot find class in .class or .jar file

    Dear community,

    One of the frustrating problems I find with programming is when the compiler or runtime environment can’t find stuff when the location to me is blatantly obvious.

    I have...
Results 1 to 10 of 10