(MacOS Mojave 10.14.6) - Why 'lib' inside /usr/local is a Unix Executable file and not anymore a folder? - macos-mojave

I have a very fresh and clean install of Mojave 10.14.6 on my 'Late 2013 MacBook Pro' (I haven't just updated from High Sierra 10.13), and I noticed that where there used to be the folder 'lib' inside path /usr/local now there is a Unix Executable file, also named 'lib', of about 7.6MB.
current situation in Mojave
Now, for a project requirement, I'd need to copy 3 dynamic libraries inside /usr/local/lib/ folder, but obviously I'm prevented from creating a folder with the same name of the Executable. I tried to look for a solution or any insight into this question, although it looks like no one really experienced this problem.
Does anyone know why there has been such change, or if this is only my odd problem?
Is there any workaround so that I can add *.dylib files to path: /usr/local/lib/ if I can't create a folder with that same name?
I would really appreciate any advice, thanks!

Related

How to install libusb manually on macOS (without Homebrew)

I tried to download libusb-1.0.0.dylib and move it to /usr/local/lib/libusb-1.0.0.dylib but Python still raised usb.core.NoBackendError. So after copying libusb to /usr/local/lib/libusb-1.0.0.dylib, should I do something else? I know many of you will suggest installing it with Homebrew but I don't like Homebrew now. Thanks in advance
pain... :)
download libusb-1.0.26.tar.bz2 from https://formulae.brew.sh/api/formula/libusb.json aka "https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2"
build with xCode to create the dynlib then archive / export the package. There is an Xcode project inside the package... or compile in your own way make/build...
copy the dynlib file to /opt/local/lib/libusb-1.0.dylib per hardcode in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/usb1/_libusb1.py ll 170 or choose 172 or 174... in method __getLibrary or symlink...
Xcode will spit out wrong file name so ensure you rename the file accordingly when you copy it. hope this helps.

How to force IntelliJ to use a different home folder

I have a computer with two hard drives. In the first one, an SSD disk, I have Windows partition (C) and on the second one (D), a raid volume, I install all the programs. I also moved my user folders (desktop, documents, downloads, pictures and videos) to D:/Users/David.
After installing IntelliJ Idea on D:/Program Filles(x86) a .IntelliJIdea13 directory appeared on D:/Users/David. No problem with this as all was working nice. Then I installed Scala plugin, created a new SBT project and build it. After this, the .sbt directory used by SBT was in C:/Users/David/.sbt but the references to the libraries in my project are pointing to D:/Users/David/.sbt. The question is, how can I force IntelliJ Idea or Scala plugin to download the libraries to D:/Users/David.sbt?
Not 100% sure if this can be a solution, you can change the HOME folder of Intellij IDEA. Look for the folder where the idea executable is. In Linux I have on
~/applications/idea13/bin
On Windows you can check the properties of the menu item. There should be file idea.properties that contains the home folder location of the idea files.
You can find more information here that describe more details:
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults,
make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path
On the other hand you can change the location of your project to D:/Users/David. you should also have a look inside the project folder, there should be a .idea folder with has a library directory. They contains the location of the libs used in the project with their paths.
As dawez allready answered, you should edit idea.properties to set config, system, plugins and log paths.
But if you want to change the user.home path, then you must edit idea.exe.vmoptions file. Just add the following at the end of the file:
-Duser.home=your_new_user_home_path
If you use idea64.exe then you should edit idea64.exe.vmoptions file.
JetBrains had added complete set of features to support such a case and this is described here:
Changing IDE default directories used for config, plugins, and caches storage

Unable to copy files from file system to IntelliJ IDEA 10.5

I have just started using IntelliJ IDEA.I am really novice to this IDE, so please bear if my question sounds silly.
I am facing a problem regarding copying of files from OS's File explorer to IntelliJ Project.
I am using following versions:
Operating System: Ubuntu v. 11.04
IntelliJ IDEA: v. 10.5.1
JDK: v. 1.6.0_27
For e.g. in the following image I have created a project having a Maven module.
I am unable to copy a schema file (.xsd) on my file system into the folder ..../src/main/conf/vehAvailRate.I tried out so many times but the file is not getting copied.Also I tried the Synchronize feature too but that too didn't helped.However when I open the project in file system and copy my desired schema file there ,IntelliJ IDEA relfects the change.
Am I doing something wrong or there is some other reason behind this behavior?
Thanks,
Jignesh
Such copy should be performed externally, using your favorite file manager. IDEA will refresh files under its project directory automatically.
If something goes wrong, check idea.log file in ~/.IntelliJIdea10/system/log directory.

No 'server' JVM at '...'

I'm running a java application that we distribute as a server-side system. I'm trying to write a launcher ("write" is somewhat of an overstatement here, I'm basically just copying the Java.exe file so that we can get the desired name in the process explorer of windows). This exe is in our bin/ directory of our application file tree.
Now, we also have a jre/ directory in our file tree, which is where Java.exe actually resides (we ship our product with the Java environment). When I use Java.exe as the launcher, which is located in \jre\jre1.6.0_21\bin, or if I place the copy (call this exectuable 'Orange.exe') I made in this directory, it works just fine. But, if I put my 'Orange.exe' in the bin\ directory, then I get the following error:
Error: no 'server' JVM at 'C:\Program Files\Java\jre6\bin\server\jvm.dll'
I think I understand what is happening here - I want to use the server version of the jvm.dll file, which is in our jre directory. The problem is, I don't understand WHY it doesn't look in the jre\jre1.6.0_21 directory in my application path. I've set my JAVA_HOME environment variable to this location. It seems like it's defaulting to another, system-wide expected location.
Does anyone know how I can change this, so that it looks in my application-provided java environment directory? Ideally, this will be an environment variable, as I need to call this application with parameters using a batch file.
There is a little trick to get the server JVM up and running:
Copy "server" folder from the JDK's JRE's bin folder example: C:\Program Files\Java\jdk1.6.0\jre\bin\server
Paste the "server" folder to JRE's bin folder example: C:\Program Files\Java\jre1.6.0\bin
Done
See official readme for details.
I've just been struggling with this same problem in Eclipse and I noted that as suggested by the answer above the JBoss site has a thread on this issue saying the same as the answer above to copy files from the jdk to the jre folder.
I noticed that you can avoid having to do this if you define the runtime to be the jdk when you create the server. I didn't find how to edit an existing server though.
AFAIK, the JRE usually doesn't ship with a server VM (only the client VM). If you really need the server VM, you have to use the JDK installation.
See Oracle Java for Developers Download page for JRE's with Server VM.
I had the same problem here but, in my case, I just had not properly update the JAVA_HOME and my PATH for my recently installed JDK.
I just updated it to my new JDK location and the server started just fine.
Windows looks for DLLs in LIBPATH environment variable.
And make sure your 1.6.0_21 is somewhere first in PATH.
I solved the same problem by setting the JAVA_HOME path to C:\Program Files (x86)\Java\jre1.8.0_131\bin
The easiest fix is simply to copy the contents of client folder inside bin and put in a newly created folder 'server' inside bin.
Copy from C:\Program Files (x86)\Java\jre1.8.0_261\bin\client
Paste in C:\Program Files (x86)\Java\jre1.8.0_261\bin\server
*server is the new folder
Make sure that server/jvm.dll file must be there when we are trying to run servers like servicemix.
Copy "server" folder from the JDK's JRE's bin folder example: C:\Program Files\Java\jdk1.6.0\jre\bin\server
Paste the "server" folder to JRE's bin folder example: C:\Program Files\Java\jre1.6.0\bin
I paced problem, I went through above..That's working fine.
Thanks!

Is there an easy way to put my entire installation of Intellij on a USB stick?

I'm considering switching from Eclipse to Intellij. One thing I like about Eclipse is that the whole installation is just a folder, and I can put that on a USB stick and copy it to another computer if I want. All of my plugins, settings, and everything else come with me and all I have to do is simply copy a folder.
Is there any way I could do this with Intellij?
Yes, it's possible, just copy the installation directory to the flash drive, then edit IDEA_HOME\bin\idea.properties file, change the values of idea.config.path and idea.plugins.path to the relative location, like: ../config and ../user-plugins (locations are relative to IDEA bin directory).
Now copy your original settings and third-party plug-ins (if any):
${user.home}/.IntelliJIdea10/config => usb:/IDEA_HOME/config
${user.home}/.IntelliJIdea10/config/plugins => usb:/IDEA_HOME/user-plugins
Note that it's not recommended to change idea.system.path variable, so that it remains on the fast local drive, otherwise it could affect IDEA performance and occupy a lot of USB drive space.
One thing you could also do is to use the ${idea.home} path variable. I described in an article how you can create a portable version of IntelliJ IDEA including a version of the JDK.
https://leolabs.org/blog/making-intellij-portable/
I hope it can help you, as this is my first article in English ;)
Regards
leolabs
In addition to the answer of CrazyCoder:
To copy the "system" folder of IntelliJ / PHPStorm to the usb memory stick is required if you want that IntelliJ / PHPStorm behave like a portable app.
To get the desired folders install IntelliJ / PHPStorm to your HDD and run it at least one time.
On Windows 7 the path is (copy the folders to your usb memory stick):
%USERNAME%\.WebIde10\config\ => usb:/IDEA_HOME/config
%USERNAME%\.WebIde10\system\ => usb:/IDEA_HOME/user-plugins
Note that user-plugins is not created at first start of IntelliJ / PHPStorm, so create it on your usb memory stick.
Edit the idea.properties as CrazyCoder told you and change all 3 values:
idea.config.path
idea.plugins.path
idea.system.path
open c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\bin\idea.properties
change # idea.config.path=${user.home}/.IntelliJIdea/config to idea.config.path=../PortableSetting/config
change # idea.system.path=${user.home}/.IntelliJIdea/system to idea.system.path=../PortableSetting/system
change # idea.plugins.path=${idea.config.path}/plugins to idea.plugins.path=../PortableSetting/config/plugins
change # idea.log.path=${idea.system.path}/log to idea.log.path=../PortableSetting/system/log
make PortableSetting folder in c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\
copy content of C:\Documents and Settings\User\.IntelliJIdea14\ to c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\PortableSetting\
copy c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3 to USB and enjoy!
I wrote this answer for windows XP default directory.
for more information about default directory look at here.
I read other people answers and made an step by step answer.
You can use portableapps platform for portable intellij. Details description is here.