Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
Hi guys,

Could somebody help me to run this app called "PjeCalc" on MacOS? It is an Java application made for Windows, but the Support Team told me that Icould run it on MacOS following this steps:
1) copy files from JRE folder of Java 8 on MacOS and paste in "bin/jre" of the application.
2) replace executables in "IniciarPjeCalc.bat"
3) After opened, it could be accessed by tp://localhost:9257/pjecalc (outdated link removed)

It doesn’t work for me.
Somebody could help me, please?

Here is the application:
tps://drive.google.om/file/d/1u42WxyUTkctuc-EiBMUTMk5lklsRHkCQ/view?usp=share_link (outdated link removed)
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You will first need to ensure that you have Java 8 installed. So open a Terminal window and type the command "java -version" and see what you get back. You want to see a value of "1.8" version indicating you have the right version. If you get an error or anything else, you don't have Java installed or the wrong version installed.

Once you're past that, go to the location of the InciarPjeCalc.bat file and look at it's contents with something like "cat InciarPjeCalc.bat". You'll see a bunch of stuff that's Windows specific in there, so file is not useful on macOS. However, you want to make note any line that begins with "java -jar..." and has any other arguments and a JAR file in there, that's the line that's beginning the application.

With that line in hand, paste it into the Terminal to have the application start. Now it's up and running, we can figure out how to create a simple script to load the program easily.
 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
You will first need to ensure that you have Java 8 installed. So open a Terminal window and type the command "java -version" and see what you get back. You want to see a value of "1.8" version indicating you have the right version. If you get an error or anything else, you don't have Java installed or the wrong version installed.

Once you're past that, go to the location of the InciarPjeCalc.bat file and look at it's contents with something like "cat InciarPjeCalc.bat". You'll see a bunch of stuff that's Windows specific in there, so file is not useful on macOS. However, you want to make note any line that begins with "java -jar..." and has any other arguments and a JAR file in there, that's the line that's beginning the application.

With that line in hand, paste it into the Terminal to have the application start. Now it's up and running, we can figure out how to create a simple script to load the program easily.


Thanks for your answer.
I follow your guidance and when I type the command "-jar bin\pjecalc.jar", it returns an error message.

I'm not a programmer so I'm kind of lost. My Java version is 1.8.0.331.

Could you give more instructions?

I got some images:





 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You need to put the entire command starting with "javaw" and the rest of the arguments all the way to the end.

So you'll want to have "java -splash=... -Dsegua... -Xms1024m .... -jar bin\pjecalc.jar"
 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
You need to put the entire command starting with "javaw" and the rest of the arguments all the way to the end.

So you'll want to have "java -splash=... -Dsegua... -Xms1024m .... -jar bin\pjecalc.jar"

Where can I be going wrong? I reversed the slash so I could read it.

 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You need to be in the right folder for all of this to work. Start with being in the top of the folder where this application is. Otherwise, the command can't find the files.

To do this, within Finder go to the folder where you have the application. Then go up one level within Finder and now you can drag the folder to the Terminal window to get fully location.

Within the Terminal, you could type "cd " and then drop the location and hit Enter. Now you should be able to run the java command to have it find the JAR file.
 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
You need to be in the right folder for all of this to work. Start with being in the top of the folder where this application is. Otherwise, the command can't find the files.

To do this, within Finder go to the folder where you have the application. Then go up one level within Finder and now you can drag the folder to the Terminal window to get fully location.

Within the Terminal, you could type "cd " and then drop the location and hit Enter. Now you should be able to run the java command to have it find the JAR file.


You're a genius, now it worked!
It gave an error when opening, something like "the file could not be read", but then opened.

If it's not too much to ask, what could I do to compile this and share? Maybe using AppleScript to automate?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
That error seems to be coming from the application in that it can't find something internal to it.

As far as making it easier to launch goes, check out this Stackoverflow discussion about how to do it.

 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
That error seems to be coming from the application in that it can't find something internal to it.

As far as making it easier to launch goes, check out this Stackoverflow discussion about how to do it.


Hi again, my friend! I'm almost getting there.
Any idea of what am I doing wrong?




 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
Hi again, my friend! I'm almost getting there.
Any idea of what am I doing wrong?




That error seems to be coming from the application in that it can't find something internal to it.

As far as making it easier to launch goes, check out this Stackoverflow discussion about how to do it.



Now it worked! I changed de bash file as bellow:

<a href='Captura de Tela 2023 01 17 às 16 51 55 — Postimages' target='_blank'><img (outdated link removed)
src='tps://i.postimg.cc/D4SgptZL/Captura-de-Tela-2023-01-17-a-s-16-51-55.png' border='0' alt='Captura-de-Tela-2023-01-17-a-s-16-51-55'/></a> (outdated link removed)

Thank you my friend!
The only inconvenience is clicking on the file and putting "Open with > Terminal" the first time. If you know something about it, I would be grateful.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Glad you got it working, I don't have any immediate thoughts on making it easier, but others might have thoughts..
 
OP
R
Joined
Jan 16, 2023
Messages
7
Reaction score
0
Points
1
Glad you got it working, I don't have any immediate thoughts on making it easier, but others might have thoughts..

One last thing.

I put the command "open tp://localhost:9257/pjecalc" (outdated link removed) to open the URL.

The script only opens the URL if I close the Java application. That is, while it is running, it does not jump to the URL command. Any suggestion?

I thought about putting it before opening the java file, but then it would give a broken URL.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,082
Reaction score
2,508
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Use the script to launch the application and then load that URL in your browser separately.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top