File Path In Mac For Java

Hi folks,

I researched the task and share my experience: there are principally two steps required to successfully install SAP GUI 7.3 for Java on macOS (10.12).

Select the file or folder in macOS Finder. Press Command + C to copy the file or folder in macOS Finder. Open a terminal window in macOS, then Press Command + V in the terminal window. Now you can see the file or folder’s absolute path in the terminal command-line. Select the file or folder in macOS Finder. Press Command + C to copy the file or folder in macOS Finder. Open a terminal window in macOS, then Press Command + V in the terminal window. Now you can see the file or folder’s absolute path in the terminal command-line.


Note Before You Start decide between SAP GUI 7.3 or 7.4 Java

If you have numerous systems listed in a typical saplogon.ini file you usually want to leverage this to import such settings into your SAP GUI 7.3 Java. Similarly as in Windows installations, you would point to the saplogon.ini file in the SAP GUI preferences (in Windows under »Options > SAP Logon > configurations«) as illustrated below. Since the saplogin.ini file comprises the system access data it will thus automatically set the correct SAP system connections.

You even might insert a file link to a server where the most current version of the saplogon.ini file resides. This comes in handy if system access data like IP addresses change frequently and are updated to reflect the most recent changes. If your technical department gives you a file link that points to a server, it is highly recommended to use it in lieu of a file on your local machine.

With the new version SAP GUI 7.4 Java this changed, in that a file link is not supported anymore.

File path in mac for java tutorial

Unfortunately, to run SAP GUI 7.3 Java you will need to install legacy Java version 6 according to Download Java for OS X 2015-001

Recommendation: Should you plan to use a saplogon.ini file use 7.3 not 7.4.



  • SAP GUI 7.3 for Java installation file.
  • Legacy Java 6 kit installation.
  • The Java conversion program SapGuiIniToSapcConverter.jar

Step 1: Conversion of saplogon.ini from Windows to macOS

In an SAP environment you typically face the behemoth Windows installations, at least from a file size perspective. Thus the saplogon.ini file is targeted towards Windows OS. In order to use it on macOS it needs conversion. Luckily, there is a conversion program out there that is doing this for you. An excerpt from the corresponding thread authored by Mike Schernbeck (mike.schernbeck@googlemail.com) is pasted below:

File Path In Mac For Java


To keep things short: I implemented a small tool, that is able to convert a saplogon.ini file in a way, that the information stored in it can be used by a SAPGUI for Java environments. It is implemented in Java. Here the link to JAR file: SapGuiIniToSapcConverter.jar. The tool can be used on Windows or Linux platforms, thanks to Java. Here is how to use it: Open your favorite command line (terminal on Linux / UNIX environments or command prompt in Windows environments) and type in the following command:



File

The Java program for converting saplogon.ini from Windows to macOS.

Result: a macOS ready saplogon.ini file.

Step 2: Point to saplogon.ini file

In the SAP GUI 7.3 Java preferences go to Logon and insert the file path to the saplogon.ini file in the configuration file as illustrated in the figure above.


Hope this helps.

reg,

wolf

Oct 21, 2016 9:46 AM

Java and the Mac OS X Terminal


This page is obsolete.


This document instructs you on how to use the Mac OS X Terminal with Java.

Java

You will use the Java compiler javac to compile your Java programs andthe Java interpreter java to run them.To verify that Apple's implementation of Java 2 Standard Edition (Java SE 6) isalready installed:

  • Run Software Update.
  • Run Applications/Utilities/Java/Java Preferencesand verify that the Java SE 6 - 64-bit entry is checked andfirst in the list; if not, drag to change the preferred order.
Command-line interface

You will type commands in an application called the Terminal.

  • Open a terminal window. You can find this underGo -> Applications -> Utilities. Drag the Terminal to your dock sinceyou will be using it frequently.
  • You should now have a Terminal window somewhere on the screen.It will have a prompt that looks something like:
  • To check that you are running the right version of Java, typethe commands in boldface below. You should see something similar to the information printed below. The importantpart is that it says 1.6 or 1.5 (and not 1.4).
    Then type
  • Since you will be using the Terminal frequently, you may want tocustomize the default window settings (e.g., Monaco 13pt font with antialiasing).
Compile the program

You will use the javac command to convert your Java program into a form moreamenable for execution on a computer.

  • From the Terminal, navigate to the directory containing your .javafiles, say ~wayne/introcs/hello, by typing the cd commandbelow.
  • Assuming the file, say HelloWorld.java is in the currentworking directory, type the javac command below to compile it.
    If everything went well, you should see no error messages.
Execute the program

You will use the java command to execute your program.

  • From the Terminal, type the java command below.If all goes well, you should see the output of the program -Hello, World.
Input and Output

File Path In Mac For Java Code

File

If your program gets stuck in an infinite loop, type Ctrl-c to break out.

If you are entering input from the keyboard, you can signifyto your program that there is no more data by typingCtrl-d for EOF (end of file).You should type this character on its own line.

File Path In Mac For Java Download

Troubleshooting

When I try to run java I get: Exception in thread 'main' java.lang.NoClassDefFoundError.First, be sure that HelloWorld.class is in the current directory.Be sure to type java HelloWorld without a trailing .classor .java.If this was not your problem, it's possiblethat your CLASSPATH was set by some other program so that it no longerincludes the current working directory.Try running your program with the command line

If this works, your classpath is set incorrectly.

File Path In Mac For Java Pdf

I get the error 'class file has wrong version 50.0, should be 49.0' when I compilefrom the Terminal. What does this mean?It's probably because DrJava is configured to use Java 6.0 and and your Terminal is configured to use Java 5.0.To change the default version of Java in your Terminal, launchJava Preferencest. Drag the Java SE 6 - 64-bit entryto appear first.

File Path In Mac For Java Programming

How do I get the menu to display at the topof the screen instead of at the top of the frame?Execute with java -Dapple.laf.useScreenMenuBar=true

Where can I learn more about the command line?Here is a short tutorial on thecommand-line.