Import text into unity

Is it possible to import text to unity using a .java program?

Like a java program System.out.print(“hello”);

To import that into unity?

You can write code in your C# script to read from a text file (im not sure about JS syntax). Be sure to put the text file into the Resource folder in your Assets folder. Im not sure why you would want a seperate program to read the text.

Text files can be read into Unity as MangoDerp says, by treating them as Text assets. Unity can read a .java file as a text asset, however, the code that the java file contains cannot be “executed/compiled/run”.