Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
kuwaryogi27
Creator

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.

Labels (2)
1 Solution

Accepted Solutions
kuwaryogi27
Creator
Author

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. 

View solution in original post

4 Replies
manodwhb
Champion II

@ykasture ,do you have same job version has used in Talend machine and windows server?

kuwaryogi27
Creator
Author

Hello @manodwhb ,

Yes it's the same one.


kuwaryogi27
Creator
Author

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. 

manodwhb
Champion II

@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?