I'm creating a small java program that use some special graphics to draw a picture to a certain format. The program will be run as a jar file, and needs some graphics definitions as arguments at initiation. These definitions exist in a small C# class, and should contain only small objects that tells which drawing method to be used (e.g. FillRect, DrawLine), and the coordinates.

I have my reasons for doing this cross-language, and without going into detail why, what would be the best way to achieve this? Since the definitions are so alike in the two languages, the coordinates are the same and the method names and signatures are very similar, I figured maybe there is a smart way to solve this with minimal code? Or would the easiest way just be to create an XML from the C# program and read it from the Java program?

Thanks

Recommended Answers

All 2 Replies

I (personally) would make some type of output from the C# -- either output a file or just standard-out output and read that from the java program.

Simple, when you call for JAR file include starting parameters on the same line as name of file you will execute. Then in Java app check for any arguments (args[])

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.