• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Path incorrect when calling Python file from Java class

 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

when moving Python files from a "java" package to a "python" one the path is incorrect. The Python file just doesn't get called without launching any error (attached images).

In file DisplayProduct it is this line of code.



The attached images give a more clear idea of it.



error1.PNG
[Thumbnail for error1.PNG]
error2.PNG
[Thumbnail for error2.PNG]
error3.PNG
[Thumbnail for error3.PNG]
 
Marshal
Posts: 71007
291
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and what is the correct path?
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This was the one that worked (within the java package). This is the call to Python from Java;



This is within;



It works if the Python file is in the same package that the Java file which is calling it.

I would like to place "trainModel.py" in this package;



And then call it from the Java class located in the java package.





 
reply
    Bookmark Topic Watch Topic
  • New Topic