views:

27

answers:

1

Hi guys,

I have a .java and .class file which i put under a folder inside my pydev project in Eclipse (because im primarily using python).

Inside my python script i wanted to call the java class file using os.system.

os.system('java -mx1500m D:\\projects\\socialsense\\src\\ss\\samplefile\\test')

However it says that my class file is not found. What is wrong?

A: 

I expect that you can do that. However, most people would probably put the java source and python source in separate directory trees, and also not put .class and .java files in the same tree. (If you lump everything into the same place you'll cause yourself pain when you try to implement a "clean" rule in your build file ... or when you want to check your project into version control.)

Your immediate problem is that you've got the command syntax for the java command wrong. The name of the entry point class is specified by giving a fully qualified class name, not a pathname. And you probably need to use the -cp option as well.

For details on how to do this right, refer to the java manual page.

Stephen C