Error: Could not find or load main class MyCSVParserTomcat native library not found on java pathWhat does “Could not find or load main class” mean?Path Variable Not Workingerror launching pyspark: '“java” is not recognized as an internal or external command'Javac is not recognized. (Already set path)win32com.dll Library not loadingAnt isn't being recognized as a command. Ant 1.7.1Javac not recognized after setting path to JDK/bin directorybig problems setting a path for jdk win 10the type javax.accessibility.accessible cannot be resolved. It is indirectly referenced from .class files

Pre-Employment Background Check With Consent For Future Checks

I keep switching characters, how do I stop?

How to split IPA spelling into syllables

Why is "la Gestapo" feminine?

Non-Borel set in arbitrary metric space

Is this saw blade faulty?

Friend wants my recommendation but I don't want to give it to him

Magnifying glass in hyperbolic space

Derivative of an interpolated function

Output visual diagram of picture

Not hide and seek

What is this high flying aircraft over Pennsylvania?

What is it called when someone votes for an option that's not their first choice?

How would a solely written language work mechanically

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

Why didn't Voldemort know what Grindelwald looked like?

Did I make a mistake by ccing email to boss to others?

Why can't I get pgrep output right to variable on bash script?

What should be the ideal length of sentences in a blog post for ease of reading?

Turning a hard to access nut?

Started in 1987 vs. Starting in 1987

How do I lift the insulation blower into the attic?

Are hand made posters acceptable in Academia?

Travelling in US for more than 90 days



Error: Could not find or load main class MyCSVParser


Tomcat native library not found on java pathWhat does “Could not find or load main class” mean?Path Variable Not Workingerror launching pyspark: '“java” is not recognized as an internal or external command'Javac is not recognized. (Already set path)win32com.dll Library not loadingAnt isn't being recognized as a command. Ant 1.7.1Javac not recognized after setting path to JDK/bin directorybig problems setting a path for jdk win 10the type javax.accessibility.accessible cannot be resolved. It is indirectly referenced from .class files













0















I have a .class that I've compiled from a .java



package csvExam.MyCSVParser;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;


public class MyCSVParser


public static void main(String[] args)
String csvFile = "/Users/dbaug/Desktop/idestuff/csvExam/testme.csv";
BufferedReader br = null;
String line = "";
String cvsSplitBy = ",";

if(csvFile==null)

System.out.println("no CSV File found, try again.");

else

try

br = new BufferedReader(new FileReader(csvFile));
while ((line = br.readLine()) != null)
String[] mainLine = line.split(cvsSplitBy);

System.out.println("am I reading anything");



catch (FileNotFoundException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
finally
if (br != null)
try
br.close();
catch (IOException e)
e.printStackTrace();








I am able to compile using javac MyCSVParser.java and I received a MyCSVParser.class
both of these files sit in "C:UsersdbaugDesktopidestuffcsvExam"



my %PATH% is:




C:Program Files (x86)Razer Chroma SDKbin;C:Program FilesRazer
Chroma SDKbin;C:Program Files (x86)Common
FilesOracleJavajavapath;C:ProgramDataOracleJavajavapath;C:Program
Files (x86)InteliCLS Client;C:Program FilesInteliCLS
Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program
Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program
FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files
(x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program
FilesIntelIntel(R) Management Engine
ComponentsIPT;C:WINDOWSSystem32OpenSSH;C:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsApps;C:Program
FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program Files (x86)NVIDIA
CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program
FilesJavajdk1.8.0_191bin;C:Program
Filesdotnet;C:UsersdbaugAppDataLocalMicrosoftWindowsApps;C:UsersdbaugAppDataLocalGitHubDesktopbin;C:Program
FilesJavajdk1.8.0_191bin;




where you can see ";C:Program FilesJavajdk1.8.0_191bin;" at the bottom.



in Environmental Variables I have variable path set to "C:Program FilesJavajdk1.8.0_191bin"



Below are all the inputs and results I encounter.




Microsoft Windows [Version 10.0.17763.316] (c) 2018 Microsoft
Corporation. All rights reserved.



C:Usersdbaug>cd c:



c:>java -classpath C:UsersdbaugDesktopidestuffcsvExam
MyCSVParser Error: Could not find or load main class MyCSVParser



c:>java -cp C:UsersdbaugDesktopidestuffcsvExam MyCSVParser
Error: Could not find or load main class MyCSVParser



c:>cd C:UsersdbaugDesktopidestuffcsvExam



C:UsersdbaugDesktopidestuffcsvExam>java MyCSVParser Error: Could
not find or load main class MyCSVParser



C:UsersdbaugDesktopidestuffcsvExam>cd
C:UsersdbaugDesktopidestuff



C:UsersdbaugDesktopidestuff>java csvExam.MyCSVParser Error: Could
not find or load main class csvExam.MyCSVParser



C:UsersdbaugDesktopidestuff>




I'm not trying to do anything special besides just trying to get a .class to run through terminal, as that's my next step from an IDE to validate my programs working. However I've been stumped all day over what I might be doing wrong and I'm just not sure. I run Windows 10, trying to use Java JDK jdk1.8.0_191, I downloaded from oracle java website.










share|improve this question


























    0















    I have a .class that I've compiled from a .java



    package csvExam.MyCSVParser;

    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;


    public class MyCSVParser


    public static void main(String[] args)
    String csvFile = "/Users/dbaug/Desktop/idestuff/csvExam/testme.csv";
    BufferedReader br = null;
    String line = "";
    String cvsSplitBy = ",";

    if(csvFile==null)

    System.out.println("no CSV File found, try again.");

    else

    try

    br = new BufferedReader(new FileReader(csvFile));
    while ((line = br.readLine()) != null)
    String[] mainLine = line.split(cvsSplitBy);

    System.out.println("am I reading anything");



    catch (FileNotFoundException e)
    e.printStackTrace();
    catch (IOException e)
    e.printStackTrace();
    finally
    if (br != null)
    try
    br.close();
    catch (IOException e)
    e.printStackTrace();








    I am able to compile using javac MyCSVParser.java and I received a MyCSVParser.class
    both of these files sit in "C:UsersdbaugDesktopidestuffcsvExam"



    my %PATH% is:




    C:Program Files (x86)Razer Chroma SDKbin;C:Program FilesRazer
    Chroma SDKbin;C:Program Files (x86)Common
    FilesOracleJavajavapath;C:ProgramDataOracleJavajavapath;C:Program
    Files (x86)InteliCLS Client;C:Program FilesInteliCLS
    Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program
    Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program
    FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files
    (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program
    FilesIntelIntel(R) Management Engine
    ComponentsIPT;C:WINDOWSSystem32OpenSSH;C:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsApps;C:Program
    FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program Files (x86)NVIDIA
    CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program
    FilesJavajdk1.8.0_191bin;C:Program
    Filesdotnet;C:UsersdbaugAppDataLocalMicrosoftWindowsApps;C:UsersdbaugAppDataLocalGitHubDesktopbin;C:Program
    FilesJavajdk1.8.0_191bin;




    where you can see ";C:Program FilesJavajdk1.8.0_191bin;" at the bottom.



    in Environmental Variables I have variable path set to "C:Program FilesJavajdk1.8.0_191bin"



    Below are all the inputs and results I encounter.




    Microsoft Windows [Version 10.0.17763.316] (c) 2018 Microsoft
    Corporation. All rights reserved.



    C:Usersdbaug>cd c:



    c:>java -classpath C:UsersdbaugDesktopidestuffcsvExam
    MyCSVParser Error: Could not find or load main class MyCSVParser



    c:>java -cp C:UsersdbaugDesktopidestuffcsvExam MyCSVParser
    Error: Could not find or load main class MyCSVParser



    c:>cd C:UsersdbaugDesktopidestuffcsvExam



    C:UsersdbaugDesktopidestuffcsvExam>java MyCSVParser Error: Could
    not find or load main class MyCSVParser



    C:UsersdbaugDesktopidestuffcsvExam>cd
    C:UsersdbaugDesktopidestuff



    C:UsersdbaugDesktopidestuff>java csvExam.MyCSVParser Error: Could
    not find or load main class csvExam.MyCSVParser



    C:UsersdbaugDesktopidestuff>




    I'm not trying to do anything special besides just trying to get a .class to run through terminal, as that's my next step from an IDE to validate my programs working. However I've been stumped all day over what I might be doing wrong and I'm just not sure. I run Windows 10, trying to use Java JDK jdk1.8.0_191, I downloaded from oracle java website.










    share|improve this question
























      0












      0








      0








      I have a .class that I've compiled from a .java



      package csvExam.MyCSVParser;

      import java.io.BufferedReader;
      import java.io.FileNotFoundException;
      import java.io.FileReader;
      import java.io.IOException;


      public class MyCSVParser


      public static void main(String[] args)
      String csvFile = "/Users/dbaug/Desktop/idestuff/csvExam/testme.csv";
      BufferedReader br = null;
      String line = "";
      String cvsSplitBy = ",";

      if(csvFile==null)

      System.out.println("no CSV File found, try again.");

      else

      try

      br = new BufferedReader(new FileReader(csvFile));
      while ((line = br.readLine()) != null)
      String[] mainLine = line.split(cvsSplitBy);

      System.out.println("am I reading anything");



      catch (FileNotFoundException e)
      e.printStackTrace();
      catch (IOException e)
      e.printStackTrace();
      finally
      if (br != null)
      try
      br.close();
      catch (IOException e)
      e.printStackTrace();








      I am able to compile using javac MyCSVParser.java and I received a MyCSVParser.class
      both of these files sit in "C:UsersdbaugDesktopidestuffcsvExam"



      my %PATH% is:




      C:Program Files (x86)Razer Chroma SDKbin;C:Program FilesRazer
      Chroma SDKbin;C:Program Files (x86)Common
      FilesOracleJavajavapath;C:ProgramDataOracleJavajavapath;C:Program
      Files (x86)InteliCLS Client;C:Program FilesInteliCLS
      Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program
      Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program
      FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files
      (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program
      FilesIntelIntel(R) Management Engine
      ComponentsIPT;C:WINDOWSSystem32OpenSSH;C:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsApps;C:Program
      FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program Files (x86)NVIDIA
      CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program
      FilesJavajdk1.8.0_191bin;C:Program
      Filesdotnet;C:UsersdbaugAppDataLocalMicrosoftWindowsApps;C:UsersdbaugAppDataLocalGitHubDesktopbin;C:Program
      FilesJavajdk1.8.0_191bin;




      where you can see ";C:Program FilesJavajdk1.8.0_191bin;" at the bottom.



      in Environmental Variables I have variable path set to "C:Program FilesJavajdk1.8.0_191bin"



      Below are all the inputs and results I encounter.




      Microsoft Windows [Version 10.0.17763.316] (c) 2018 Microsoft
      Corporation. All rights reserved.



      C:Usersdbaug>cd c:



      c:>java -classpath C:UsersdbaugDesktopidestuffcsvExam
      MyCSVParser Error: Could not find or load main class MyCSVParser



      c:>java -cp C:UsersdbaugDesktopidestuffcsvExam MyCSVParser
      Error: Could not find or load main class MyCSVParser



      c:>cd C:UsersdbaugDesktopidestuffcsvExam



      C:UsersdbaugDesktopidestuffcsvExam>java MyCSVParser Error: Could
      not find or load main class MyCSVParser



      C:UsersdbaugDesktopidestuffcsvExam>cd
      C:UsersdbaugDesktopidestuff



      C:UsersdbaugDesktopidestuff>java csvExam.MyCSVParser Error: Could
      not find or load main class csvExam.MyCSVParser



      C:UsersdbaugDesktopidestuff>




      I'm not trying to do anything special besides just trying to get a .class to run through terminal, as that's my next step from an IDE to validate my programs working. However I've been stumped all day over what I might be doing wrong and I'm just not sure. I run Windows 10, trying to use Java JDK jdk1.8.0_191, I downloaded from oracle java website.










      share|improve this question














      I have a .class that I've compiled from a .java



      package csvExam.MyCSVParser;

      import java.io.BufferedReader;
      import java.io.FileNotFoundException;
      import java.io.FileReader;
      import java.io.IOException;


      public class MyCSVParser


      public static void main(String[] args)
      String csvFile = "/Users/dbaug/Desktop/idestuff/csvExam/testme.csv";
      BufferedReader br = null;
      String line = "";
      String cvsSplitBy = ",";

      if(csvFile==null)

      System.out.println("no CSV File found, try again.");

      else

      try

      br = new BufferedReader(new FileReader(csvFile));
      while ((line = br.readLine()) != null)
      String[] mainLine = line.split(cvsSplitBy);

      System.out.println("am I reading anything");



      catch (FileNotFoundException e)
      e.printStackTrace();
      catch (IOException e)
      e.printStackTrace();
      finally
      if (br != null)
      try
      br.close();
      catch (IOException e)
      e.printStackTrace();








      I am able to compile using javac MyCSVParser.java and I received a MyCSVParser.class
      both of these files sit in "C:UsersdbaugDesktopidestuffcsvExam"



      my %PATH% is:




      C:Program Files (x86)Razer Chroma SDKbin;C:Program FilesRazer
      Chroma SDKbin;C:Program Files (x86)Common
      FilesOracleJavajavapath;C:ProgramDataOracleJavajavapath;C:Program
      Files (x86)InteliCLS Client;C:Program FilesInteliCLS
      Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program
      Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program
      FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files
      (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program
      FilesIntelIntel(R) Management Engine
      ComponentsIPT;C:WINDOWSSystem32OpenSSH;C:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsApps;C:Program
      FilesNVIDIA CorporationNVIDIA NvDLISR;C:Program Files (x86)NVIDIA
      CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;C:Program
      FilesJavajdk1.8.0_191bin;C:Program
      Filesdotnet;C:UsersdbaugAppDataLocalMicrosoftWindowsApps;C:UsersdbaugAppDataLocalGitHubDesktopbin;C:Program
      FilesJavajdk1.8.0_191bin;




      where you can see ";C:Program FilesJavajdk1.8.0_191bin;" at the bottom.



      in Environmental Variables I have variable path set to "C:Program FilesJavajdk1.8.0_191bin"



      Below are all the inputs and results I encounter.




      Microsoft Windows [Version 10.0.17763.316] (c) 2018 Microsoft
      Corporation. All rights reserved.



      C:Usersdbaug>cd c:



      c:>java -classpath C:UsersdbaugDesktopidestuffcsvExam
      MyCSVParser Error: Could not find or load main class MyCSVParser



      c:>java -cp C:UsersdbaugDesktopidestuffcsvExam MyCSVParser
      Error: Could not find or load main class MyCSVParser



      c:>cd C:UsersdbaugDesktopidestuffcsvExam



      C:UsersdbaugDesktopidestuffcsvExam>java MyCSVParser Error: Could
      not find or load main class MyCSVParser



      C:UsersdbaugDesktopidestuffcsvExam>cd
      C:UsersdbaugDesktopidestuff



      C:UsersdbaugDesktopidestuff>java csvExam.MyCSVParser Error: Could
      not find or load main class csvExam.MyCSVParser



      C:UsersdbaugDesktopidestuff>




      I'm not trying to do anything special besides just trying to get a .class to run through terminal, as that's my next step from an IDE to validate my programs working. However I've been stumped all day over what I might be doing wrong and I'm just not sure. I run Windows 10, trying to use Java JDK jdk1.8.0_191, I downloaded from oracle java website.







      java terminal compilation






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 1:21









      Devin BDevin B

      248




      248






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Hello I don't know what I was doing wrong, but I changed package csvExam;
          I now cd to the directory and can "java csvExam.MyCSVParser"






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034635%2ferror-could-not-find-or-load-main-class-mycsvparser%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Hello I don't know what I was doing wrong, but I changed package csvExam;
            I now cd to the directory and can "java csvExam.MyCSVParser"






            share|improve this answer



























              0














              Hello I don't know what I was doing wrong, but I changed package csvExam;
              I now cd to the directory and can "java csvExam.MyCSVParser"






              share|improve this answer

























                0












                0








                0







                Hello I don't know what I was doing wrong, but I changed package csvExam;
                I now cd to the directory and can "java csvExam.MyCSVParser"






                share|improve this answer













                Hello I don't know what I was doing wrong, but I changed package csvExam;
                I now cd to the directory and can "java csvExam.MyCSVParser"







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 7 at 1:34









                Devin BDevin B

                248




                248





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034635%2ferror-could-not-find-or-load-main-class-mycsvparser%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко