2

For a school culminating, I have been given data to work with and create a visualization. I had started by creating a Java project in Netbeans to read the file and create objects out of the data. Now, I have decided to visualize the data using the Google Maps API which requires JavaScript and I want to avoid having to re-code everything using JavaScript. So... is there a way for my webpage (in JavaScript) to run my Java program (which will give me objects) and return an array full of these objects? Also, if it changes anything, I want to run the webpage without a server from my computer directory.

Thanks, Josh

1
  • 1
    You could make your java program output a json file of your data and have that local page use that to populate your maps. Also you can make an applet that talks to javascript, Heres a link to get started docs.oracle.com/javase/tutorial/deployment/applet/… Commented Dec 30, 2013 at 21:21

1 Answer 1

5

You cannot do this directly. I recommend making your Java program into a web service and returning the results in JSON.

Sign up to request clarification or add additional context in comments.

2 Comments

Forgive me for being such a noob but how would I go about doing that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.