Mac-ios下JDK的安装路径(java)

本文介绍如何在Mac系统中查找已安装的JDK及其默认安装路径,并提供了通过SSH工具进行目录查看的具体操作步骤。

苹果的Mac系统已经包含了完整的J2SE(Java SE),其中就有JDK和JVM(苹果叫VM),如果要升级JDK,需要自己下载安装。 在Mac系统中,JDK的安装路径与windows不同,默认目录是:/System/Libray/Frameworks/JavaVM.Framwork/。 在这个目录下有个Versions目录,里面有不同版本的JDK。

首先,让我们打开硬盘:Finder-->前往-->电脑-->Macintosh HD




在 ssh 工具中连接查看:


suningdeMac-mini:Frameworks suning$ ls
suningdeMac-mini:Frameworks suning$ ls
AGL.framework				CoreDisplay.framework			Foundation.framework			LatentSemanticMapping.fra
AVFoundation.framework			CoreFoundation.framework		GLKit.framework				LocalAuthentication.frame
AVKit.framework				CoreGraphics.framework			GLUT.framework				MapKit.framework		
Accelerate.framework			CoreImage.framework			GSS.framework				MediaAccessibility.framew
Accounts.framework			CoreLocation.framework			GameController.framework		MediaLibrary.framework		
AddressBook.framework			CoreMIDI.framework			GameKit.framework			MediaToolbox.framework		
AppKit.framework			CoreMIDIServer.framework		GameplayKit.framework			Message.framework		
AppKitScripting.framework		CoreMedia.framework			Hypervisor.framework			Metal.framework			
AppleScriptKit.framework		CoreMediaIO.framework			ICADevices.framework			MetalKit.framework		
AppleScriptObjC.framework		CoreServices.framework			IMCore.framework			ModelIO.framework		
ApplicationServices.framework		CoreTelephony.framework			IMServicePlugIn.framework		MultipeerConnectivity.fra
AudioToolbox.framework			CoreText.framework			IOBluetooth.framework			NetFS.framework			
AudioUnit.framework			CoreVideo.framework			IOBluetoothUI.framework			NetworkExtension.framewor
AudioVideoBridging.framework		CoreWLAN.framework			IOKit.framework				NotificationCenter.framew
Automator.framework			CryptoTokenKit.framework		IOSurface.framework			OSAKit.framework		
CFNetwork.framework			DVComponentGlue.framework		ImageCaptureCore.framework		OpenAL.framework		
CalendarStore.framework			DVDPlayback.framework			ImageIO.framework			OpenCL.framework		
Carbon.framework			DirectoryService.framework		InputMethodKit.framework		OpenDirectory.framework		
CloudKit.framework			DiscRecording.framework			InstallerPlugins.framework		OpenGL.framework		
Cocoa.framework				DiscRecordingUI.framework		InstantMessage.framework		PCSC.framework			
Collaboration.framework			DiskArbitration.framework		Intents.framework			Photos.framework		
Contacts.framework			DrawSprocket.framework			JavaFrameEmbedding.framework		PhotosUI.framework		
ContactsUI.framework			EventKit.framework			JavaScriptCore.framework		PreferencePanes.framework
CoreAudio.framework			ExceptionHandling.framework		JavaVM.framework			PubSub.framework		
CoreAudioKit.framework			FWAUserLib.framework			Kerberos.framework			Python.framework		
CoreBluetooth.framework			FinderSync.framework			Kernel.framework			QTKit.framework			
CoreData.framework			ForceFeedback.framework			LDAP.framework				Quartz.framework	

suningdeMac-mini:Frameworks suning$ cd JavaVM.framework/
suningdeMac-mini:JavaVM.framework suning$ 
suningdeMac-mini:JavaVM.framework suning$ ls
Frameworks JavaVMResourcesVersions
suningdeMac-mini:JavaVM.framework suning$ cd Versions/
suningdeMac-mini:Versions suning$ 
suningdeMac-mini:Versions suning$ LS
A Current
suningdeMac-mini:Versions suning$ LS
A Current
suningdeMac-mini:Versions suning$ ls
A Current
suningdeMac-mini:Versions suning$ cd Current
suningdeMac-mini:Current suning$ 
suningdeMac-mini:Current suning$ LS
Commands FrameworksJavaPluginCocoa.bundleJavaVMResources_CodeSignature
suningdeMac-mini:Current suning$ cd Frameworks/ 
suningdeMac-mini:Frameworks suning$ ls
JavaNativeFoundation.framework JavaRuntimeSupport.framework
suningdeMac-mini:Frameworks suning$ cd ..
suningdeMac-mini:Current suning$ ls
Commands FrameworksJavaPluginCocoa.bundleJavaVMResources_CodeSignature
suningdeMac-mini:Current suning$ cd JavaVM
-bash: cd: JavaVM: Not a directory
suningdeMac-mini:Current suning$ java version
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...



用户安装的jdk:

  

接上图,bin文件下可以看到java,javac两个执行程序






评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值