开发者

Can i put java files in a folder in a pydev project?

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开发者_C百科?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜