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?


Re: Init a Java program with values from C# 80 80

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.

Re: Init a Java program with values from C# 80 80

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 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.