element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum JAVA or Python for Raspberry Pi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 669 subscribers
  • Views 1262 views
  • Users 0 members are here
  • raspberry_pi
  • raspberry pi
  • java
Related

JAVA or Python for Raspberry Pi

oksbwn
oksbwn over 9 years ago

Hey guys I am a java developer so it's easy for me to work around JAVA so i started like that and for every project. It's been around 2+ years i am onto JAVA only but I am just curious to know in performance wise which one is better as per your experiences...

  • Sign in to reply
  • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago

    Hello Bikash!

     

    Consider that as you have a wider experience in java probably you will be more used to develop with this language than Python. The performances are better for Java when you need to manage the hardware, in my opinion, as it is nearest to the machine operating system than Python. By the other side, Python is not so fast by itself but almost all the features made available with this language are based on C/C++ libraries so the resulting hardware responsiveness and performances are anyway good.

     

    I suggest you can start with the language you better know and - recommended - start playing on the Raspberry PI with Python as there is a wide number of libraries already available with this language. A more complex alternative can be what I am doing when I need a more direct software machine control: see the sources of the Python library and recompile the part you need (excluding the Python wrapper code) then integrate the hardware features in your Java application or port the parts you need from C to Java. But these last two ways are more complex, I think.

     

    Enrico

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • volly
    volly over 9 years ago in reply to balearicdynamics

    I happen to agree 100% with Enrico. I would also like to encourage you to always widen your resume with as many developer skills and proficiencies as possible, it is always a plus, you could only benefit from the experiences and knowledge acquired.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • oksbwn
    oksbwn over 9 years ago in reply to balearicdynamics

    Thanks for your precious comment..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • oksbwn
    oksbwn over 9 years ago in reply to volly

    I Agree

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to oksbwn

    Hi Bikah,

     

    anyway, if you base skill is better in java as you says, take in account that the PI already includes a full java support. Especially with Arduino and other micro controllers you can find good references supporting java libraries. And as java can work almost at the C++ level in the machne, it is not difficult you can include "as-is" Python components you find here and there for specific hardware interfacing.

     

    I have not yet experimented - but maybe it is necessary soon - that the same C++ libraries used by Python (usually very well documented) can be interfaced with Java programs without great difficult.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 9 years ago

    oksbwn can do both using https://github.com/mrj0/jep . This code uses JNI which is safe even with heavy threading. Give it a a whirl (try it).image

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • oksbwn
    oksbwn over 9 years ago in reply to clem57

    Hey clemm thanks for your feedback. Sorry i didn't mention that i am already using JAVA with Raspberry Pi.And for GPIO programming i am using Pi4J library.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube