How to run the portable application in headless mode in Windows 10

Hello People,
FIrstly, I’m sorry because it is probably a dumb question, but I am not able to figure out how to properly install Fiji.
I downloaded the portable version, and I’m trying to make a macro that would run in headless mode.
I am capable of openning Fiji if i digit the ImageJ-win64.exe on the command line after cd to fiji folder, but cannot run a simple HelloWorld.ijm (printf(“HelloWorld!”); ) , macro.
Could anyone help me to understand if there is a way to use fiji as a command on Windows cmd, using the portable version. And if not, how to make it run the macro?
Already thankfull for any help.

Welcome to the forum, @Murilo_Moreira!

Did you read the Headless and Scripting Headless pages?

If so, please post the command line invocation you are trying to use, which is not working.

Thank you a lot Ctrueden!
I have read those pages and the command line invocation that I was trying was:
./ImageJ-win64.exe --headless --console -macro ./HelloWord.ijm
It produces:

Java HotSpot™ 64-Bit Server VM warning: ignoring option PermSize=
128m; support was removed in 8.0
Java HotSpot™ 64-Bit Server VM warning: Using incremental CMS is deprecated a
nd will likely be removed in a future release

and then nothing happens.

My guess is that the macro is running, but you don’t see the output because there is currently an issue with Windows systems attaching to the console (in my cursory tests, it seems like the needed Windows-specific --console flag does not work anymore; you could try adding --system also to see whether that makes a difference…).

Try doing something real like reading in an image, and writing it back out to a new file.

If that still does not work, let me know and I’ll see if I can reproduce on my Windows VM.

Hello Ctrueden,
I found out that the print statement that I was using was wrong
(I was trying printf).
Sorry for the time consumed.