Getting "Error: Could not find or load main class" exception

One Star

Getting "Error: Could not find or load main class" exception

I have installed Talend open studio Data Integration 6.0.0.20150702_1326 and using Java ver jdk1.8.0_66 and JRE jre1.8.0_66.I have configured env variable JAVA_HOME as C:\Program Files\Java\jdk1.8.0_66 in system properties. Whenever I try running the Talend job I get the below mentioned error :"Error: Could not find or load main class"
Given below my configuration:
os ver: Win 7 Enterprise 32 bit
Talend Ver: "d:\Talend\TOS_DI-Win32-20150702_1326-V6.0.0"
Java : "c:\Program Files\Java\jdk1.8.0_66"
JRE: "c:\Program Files\Java\jre1.8.0_66"
Has set class path and JAVA_HOME  as indicated above and also included JDK1.8.0_66 under Windows-.Preferences->Java->Installed JREs. Still when I run my Talend job, it  fails with the error stated. Please help me with this issue.
One Star

Re: Getting "Error: Could not find or load main class" exception

Hi,
Please install Talend studio under C drive and try again.
Regards, May T.
Moderator

Re: Getting "Error: Could not find or load main class" exception

Hi,

please make sure that the java setting must be pointed to JDK folder instead of jre folder.
Please take a look at KB article about:TalendHelpCenter:Requiring a JDK installation to build jobs starting from version 6.0
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Getting "Error: Could not find or load main class" exception

Thanks a lot Sabarina and May for your reply.
Sabarina, I have already pointed my Java setting in Talend to JDK instead of JRE. But this does not resolve the issue.
May, I will try installing in C drive and update the post.
Regards,
Rajee
Moderator

Re: Getting "Error: Could not find or load main class" exception

Hi Rajee,
Are you using 32 bit JDK?
The error "Could not find or load main class" is usually caused the blank space in the installation path. Have you already checked the installation path?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Getting "Error: Could not find or load main class" exception

Yes Sabrina. I am using 32 bit JDK. And I do have a space in the installation path. Let  me try reinstalling Java to another folder.
Thanks
Rajee
Moderator

Re: Getting "Error: Could not find or load main class" exception

Hi,
The error "Could not find or load main class" is usually caused the blank space in the installation path. Have you already checked the installation path?

Please check Talend Installation directory and make sure there is no space or special characters in the path of your workspace.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Getting "Error: Could not find or load main class" exception

Sabrina, There is no space in my talend installation path. But there is a space in my java installation directory - c:\program files\java. That's why I had mentioned I would try reinstalling Java to another directory to see if it will work.
Moderator

Re: Getting "Error: Could not find or load main class" exception

Hi,
The error "Could not find or load main class" is usually caused the blank space in the Talend installation path not java.
Have you tried to type "java -version" to check if your java environment is set correctly?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.