I was wondering whether it was possible for projects in Eclipse to have multiple languages associated with them, specifically PHP and Java. The purpose of this is that I'd like a common 'properties' file for the two projects.
If instead there's a way to hold a relative reference to a file so that both projects can reference the properties file, that will work too.
Eclipse is one of the most popular IDEs for coding in Java, but, as it turns out, it can be used for different languages, including C, C++, and even Python! In this how-to article, we will learn how to get Python up and running in Eclipse with the help of the Eclipse Marketplace!
In Eclipse, use the menu Help -> Install new software. Choose "All available sites" in the combo box, wait a moment and then you can explore some other available plugins and languages. Depending on your version of Eclipse, you might also have a menu item Help -> Eclipse Marketplace.
Part one of the question
whether it was possible for projects in Eclipse to have multiple languages associated with them, specifically PHP and Java
No, a project in eclipse is language dependent. You could technically write some source in another language and then use another build method to compile from the secondary language - Not recommended !!!
For the second part of the question ...
Common Property files
Create another project and in that project put a java properties file. Have both projects (Java and PHP) read the property file from here (In Java just add where you put the file as part of the classpath) In PHP use this Java properties reader If you are careful on how you write the Java properties file you could also use parse_ini_file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With