
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could not find or load main class while running the .bat file
Hello All,
I have created a simple talend job which has a tJava component printing message "Hello" it works fine when running in TOS, I have then done build job to run it through .bat file and getting error saying could not file or load main class.
I have referred existing solutions for the same error by changing the JAVA_HOME variable value by removing bin from the path = " C:\Program Files\Java\jdk1.8.0_144 " but still it says could not find or load main class. Can you please guide me how to solve this.
Attached is the error screenshot please have a look.
Thanks in Advance.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
This issue is resolved, the issue was with the folder structure.
It is compulsory to keep the batch file in a folder whose parent directory's name does not have spaces in the name, due to this the class name of the batch file was unable to get loaded.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ykasture ,do you have same job version has used in Talend machine and windows server?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @manodwhb ,
Yes it's the same one.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
This issue is resolved, the issue was with the folder structure.
It is compulsory to keep the batch file in a folder whose parent directory's name does not have spaces in the name, due to this the class name of the batch file was unable to get loaded.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ykasture ,which means have you create a job with space or manually you changed the file with spaces because of that it is giving error?
