天道酬勤,学无止境

macos

Setting the JDK for Eclipse in MAC

I bought a MacBookPro and I'am newbie with this OS.I downloaded the JDK from Oracle's website and installed it (/Library/Java/JavaVirtualMachines/jdk_1.7...) so everything is fine when I enter "java -version" in Terminal it says : 1.7. But I could not set the 1.7 JRE on Eclipse.When I try to Add the JDK at "Java/InstalledJREs/Add" in Eclipse it doesn't accept the Home directory of jdk_1.7/Contents/Home.. What am I doing wrong, couldn't find the way to solve. Also After installation of 1.7, eclipse cant compile a simple HelloWorld.java file.It gives error something like; "java.lang.UnixProcess"

2022-01-19 02:28:57    分类:问答    java   eclipse   macos

Cannot execute JavaFX sample on macOS: No toolkit found

When trying to launch the JavaFX "Hello world" sample, the native libraries are not found -- or, they are rejected. The symptom is a "No toolkit found" exception. There seems to be some specificity to macOS, as signing is mentioned at some point. What I did (on macOS 10.14.6): Installed Java 12 from https://adoptopenjdk.net Downloaded the JavaFX 12 SDK for macOS from http://gluonhq.com/download/javafx-12-0-2-sdk-mac. Unzipped it as $WRK_DIR/javafx-sdk-12.0.2 Downloaded the JavaFX "hello world" sample from https://github.com/openjfx/samples. Unzipped it as $WRK_DIR/samples-master Then I

2022-01-19 01:36:49    分类:问答    java   macos   javafx   java-11

OSX - always hide certain files

I know how to show and hide hidden files in the Terminal - but is there a way to hide certain files like .DS_STORE when showing hidden files? Make certain files super-hidden, so to speak?

2022-01-19 01:03:17    分类:问答    macos   terminal

std::unordered_map in CLion on macOS

How can I see elements in std::unordered_map in CLion debugger? There is some recipe how to see std::map elements, but it does not work with std::unordered_map. I use clang compiler on macOS 10.13.

2022-01-19 00:33:28    分类:问答    macos   clang   clion   unordered-map

libvirt and VirtualBox on OS X

I'm trying to access VirtualBox through libvirt on OS X (Lion). I installed libvirt 0.9.4 using Homebrew. However, libvirt fails to connect to VirtualBox: # virsh -c vbox:///session error: internal error unable to initialize VirtualBox driver API error: failed to connect to the hypervisor In a similar SO question about Ubuntu, the answer was that the Ubuntu libvirt package doesn't build support for VirtualBox. How can I check if this is the problem in the case of the Homebrew package, or if it's a different issue? If it's the same problem, how do I rebuild the Homebrew package with VirtualBox

2022-01-18 23:58:10    分类:问答    macos   virtualbox   homebrew   libvirt

Failure on import pygame.font

import pygame works fine for me, but import pygame.font fails with the error: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/font.so, 2): Library not loaded: /usr/local/lib/libpng15.15.dylib Referenced from: /usr/local/lib/libfreetype.6.dylib Reason: Incompatible library version: libfreetype.6.dylib requires version 30.0.0 or later, but libpng15.15.dylib provides version 20.0.0 This is in Python 2.7 (not the system version), Mac OS 10.9. I installed libpng-1.6.9 on the idea that libfreetype wanted a later version, but that didn't seem

2022-01-18 23:42:30    分类:问答    macos   python-2.7   pygame   libpng

How to use g++ in terminal in mac?

I've installed Xcode and I can compile .cpp files in Xcode. However, I wanna use g++ in Terminal but command not found: g++ now. My OS is Mountain Lion Xcode version is 4.4.

2022-01-18 22:36:20    分类:问答    xcode   macos   terminal   gdb

Reading iPhone files from PC / Mac programmatically

Applications like iPhone Explorer can show the contents for each installed iPhone application on Mac OS X (even on non-jailbroken devices) when iPhone is connected using USB-cable. I'm trying to do something similar, programmatically copy some files from my iPhone app's folder. I have done some experiments with open-source frameworks/products built to use iTunes-framework, like iPhoneBrowser and MobileDevice Library. I can connect to iPhone, now the problem is how to enumerate Apps folder items? iPhoneBrowser or MobileDevice Library don't support or provide any easy way for that. Even when

2022-01-18 22:24:23    分类:问答    iphone   macos   detection   data-transfer

OSX Play Framework Auto-Reload

I've been scouring the internet for hours now, there is lots of "helpful" advice...that cause nothing but problems. This is me, almost exactly: Play framework auto-loading in docker container I'm running the latest (I think, don't know how to check but downloaded < a week ago) version of the Play! Framework inside a ubuntu docker container with Java 8, built with the following dockerfile: FROM ubuntu:latest MAINTAINER [REDACTED] RUN sudo apt-get update RUN sudo apt-get -y install software-properties-common RUN sudo apt-add-repository ppa:webupd8team/java RUN sudo apt-get update RUN echo oracle

2022-01-18 21:45:42    分类:问答    macos   playframework   docker   boot2docker

Adding a permanent number line to VIM OSX Terminal

I have come across a command for vim in osx terminal that allows you to view each line in a predetermined .c document, which is :set number. I want to set this parameter to be on default each time a document is created or opened. After doing a search I came across this: you can append :set number to vi ~/.vimrc First, what is this file? How do you access it, and how do I append such a command to it? I've tried searching the vim docs for .vimrc, but it doesn't make much sense as it talks about there being "4 places for initialisations, etc..."

2022-01-18 21:34:58    分类:问答    macos   vim   terminal