I am using and programming with Java for over 25 years …
When you have added the link to the prepackaged Java (included in the P21 distribution) correctly to your Windows PATH variable, the CLI command should just be the same. Reason is that the command “java” should then always be recognized automatically.
Just try “java -version” using the windows console or in a “.bat” file to check whether you have correctly added the link to your Windows PATH variable.
But why should you not have Java installed on your machine? Is there company policy that doesn’t allow it?
99.9% of the computers nowadays are sold with Java pre-installed,
Thank you for your reply!
I have Java Version 1.5.0 installed on my PC. Is that sufficient to run the CLI or do I need a newer version of the software?
Here is the code I use but nothing happens when I run it… No error, no warnings… So I could not find the problem..
No, you should at least use version 1.8. I propose that you update (<5 minutes work): 1.5 is already very very old.
Is there a reason why you have “x” before the Java command?
A reason that you do not see an error, might be that the console is closing immediately. A possibility to avoid that is to run using Windows Powershell.
“When you have added the link to the prepackaged Java (included in the P21 distribution) correctly to your Windows PATH variable, the CLI command should just be the same. Reason is that the command “java” should then always be recognized automatically.”
Could you clarify the steps I have to take? What do you mean by 'Add the Java to the Windows PATH variable" ? What is Windows PATH variable?
Since you don’t have admin rights, you can still use pre-packaged Java 8 from your Community installation. You will need to add this path to your user environmental variables.
Please use this path, replace {username} with your actual Windows user name. Make sure that this path does exist.
From Start menu open Control Panel.
In Control Panel go to User Accounts.
In User Accounts click on the “Change my environment variables” link on the left.
In the “User variables” section (top half of the screen) find Path or PATH variable. Double-click it to edit.
Click “New” and insert this path from step 1. Please also check if you already had any Java-related paths there. If you have some, please move this new path up, so that it will be preferred. Then click OK to submit.
You might need to restart the Terminal or Command Prompt for these changes to be applied.
After you follow these steps you can call the CLI with (“java -jar p21-client-1.0.2.jar …”) from either SAS, some script, or command line.
“If you don’t have Java installed on your Windows PC, you can use Java 8 that comes pre-packaged with Community. Add the following path to your PATH system variable: C:\Users{username}\AppData\Local\Programs\pinnacle21-community\resources\app.asar.unpacked\components\java64\bin”
But I don’t know how this line has to be used in the CLI which normally look like :