I am trying to build a project in Eclipse (Neon.2 Release (4.6.2)) and am trying to use Java and C. I'm not asking how to code in either language, but I'm not sure how to call a C main function passing it a param from a Java class or function. I know projects are made from multiple languages but I'm not sure how it's done and I haven't found a very solid answer from Google.
Thanks in advance.
Related
I am beginning at Java GUI, so I ask you professional coders to be understading towards to my humble question.
So, I have been coding this small Java project. I came across a problem, which is to query a Json file. During my quest over the internet looking for an answer, I stumbled upon this project on github:
https://github.com/json-path/JsonPath
Which proved to be the solution for my problem. Everything I need to be able to search for specific nodes on a json file is there, hard coded.
My beginner question: Is that possible to include this 'JsonPath' in my existing project? The IDE is Apache Netbeans 10.0 and the project is a Java SE application.
Thanks in advance!
I tried searching Services->Maven repository->Find...
I happened to find this package but I have no clue how to add the package. Also, I am not sure if its possible to add it to my project.
At first I thought doing something like "com.jayway.jsonpath" to my main class would solve my problem - But obvisouly it didn't, that's why I'm asking you guys for some guidance.
You're going to want to use a dependency management tool like Gradle or Maven first. This gives you a place to put all of the third-party dependencies like this one in your project. (Note: how to use or install either of those tools is outside of the scope of this question.)
Then, you just need the Maven coordinates. Luckily the project has those coordinates available.
I'm trying to implement a plug-in for Eclipse (using Java) for C programmers, in which the user could right click on any variable in his/her C code and I would give him all sorts of information on that variable (like usages or which function is it passed to ... etc.).
Do you know how can I achieve this? If so - can I get the C syntax tree ?
Are there any open source project I could use as a reference ?
Not a direct answer to your question, but have you heard of the program Doxygen (also has an eclipse plugin? Take a look and see if it meets your needs. Sometimes it is easier to use pre-existing plugins rather than creating your own.
I have here a small Scala console application and its working fine. I have now just one trouble: this application should be extended. One of the requests are, that there should be a GUI (AWT,SWT, Swig - doesnt matter, it just have to run on windows).
Well I really dont want to write my own GUI. I like tools like the WindowBuilder. Can I combine this effective? If I would create the GUI with the editor, I'll get generated Java code right? Could this be a problem? I just have to create a Mixin-Project, build the GUI and for each GUI element (Button or whatever with a listener) allocate a scala function. So I dont have to rewrite any of the scala stuff, just point to the function. Is this how it could work? Any suggestions? Thank you
Edit: For me it looks dirty to generate java code in a scala application, but well as I see there is no other solution.
I've done this several times and see no problem with mixing Java and Scala code in one project.
To make things easier for Scala compiler don't put Java and Scala classes into the same package.
I'm working on a project that requires me to run this code in java, but for a brief part of the code I want to access a class that is written in Objective-C. I want to pass parameters through the class then retrieve the data back into my Java file.
So to try to explain it clearer. My Java code needs to be able to access an Objective C file and retrieve data that I can implement in Java. My current IDE is eclipse, because I need to do this for android. Is there any possible way to make this work?
You can use Rococoa, http://code.google.com/p/rococoa/, or you can use JNI
Here is a similar question with answer: Wrapping an existing application with JNI
Have a look at JIGS, the Java Interface to GNUStep. http://www.gnustep.it/jigs/
I've found LINQPad to be extremely useful when answering StackOverflow questions for C# or VB.NET. It allows me to write up some quick code, run it, and (if I want) see a nicely-formatted dump of the results. That way I can be sure that the code I post actually runs. Thus far I haven't seen anything that I can use to achieve the same result with Java. Is there anything like that out there?
I am not looking for something to query data sources; I just want a light-weight IDE. These are the features I'm particularly interested in:
The ability to write and run short snippets of code without establishing a whole project or file structure.
Reporting of compiler and runtime errors in the code when it is run.
The ability to add references to a particular editor instance.
Syntax highlighting and Autocomplete/Intellisense would be a plus.
JPad - A java scratchpad for running snippets
Since I also couldn't find one I've decided to write one. Currently it can:
Run java snippets (no class / imports / public blah... needed).
Contains drivers for MS/MySQL/Postgres.
Output results as HTML tables
It's very rough but I will add to it over time. Feedback is definitely welcome.
This may help : http://www.browxy.com:9000/codeRunner
EDIT: Url seems to have changed to http://www.browxy.com
You can use the Groovy web console ; it's possible to speak java in groovy land.
Java Snippet Runner:
Does something similar to Linqpad (jar file, not just for macs)
http://mac.softpedia.com/get/Development/Java/Java-Snippet-Runner.shtml
Code Runner (Commercial):
for Mac's only, it'll run code snippets in Java, and lots of other languages too (e.g. Objective C)
http://krillapps.com/coderunner/
http://ideone.com is an online service that has the features you want.
I've been using JEdit for a long time, which is a very powerful cross-platform editor, NOT an IDE. It does have plugins to execute Java code right in the editor, and even uses BSH for macros.
I was looking for a "Java LinqPad" also, and i came across :
this
I've been using IntelliJ IDEA and it works really well as a Groovy scratchpad. The Community Edition is free too.
You need to create a new project, but then can add Groovy scripts to it and run them on the fly. Not had any luck with the actual Scratch File functionality though.
Being a Jetbrains editor it's pretty slick too. (Unlike some of the other options)
Nothing beats LinqPad though.