I tried installing protoc on windows without maven (I can't download maven due to org firewall issues).
I have my protoc.exe in the ..\src (not in java\src as many do) folder as mentioned in the readme.
When I give protoc --version in the command prompt, I get libprotoc 2.6.0. That's fine.
But when I give protoc --java_out=src/main/java -I../src/google/protobuf/descriptor.proto, I get missing input file all the time & I can't proceed further.
I have tried giving the entire path where my descriptor.proto lies, tried changing -I to -IPATH, tried using --proto_path but I still get the same Missing input file error.
Can someone help me out on this?
The command you want (from the Protobuf-Java readme) is:
protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto
Notice that the -I flag and the descriptor.proto argument are two different arguments. It looks like you accidentally merged them into one.
Related
I have tried loading the latest versions of GraalVm from the site onto OS/X from : graalvm-ce-java11-darwin-amd64-20.2.0.tar.gz
I tar this bundle, following the instructions and sudo mv the directory to /Libaray/Java/JavaVirtualMachines and setup the .bash_profile per the instructions. If I run the java_home -V command I see the VM there.
When I try to execute any of the command line utilizes from the VM (java, javac, jar, etc.) I get a fault by OS/X saying the application is from an untrusted developer. I then I have to to control panel/security and settings/general and manually select each an every binary and each and every native library one at a time and tell OS/X to add them as an exception to allow them to be run.
Am I missing something or is this expected behavior? Is there a better way to install the graalVM on OS/X?
This is an old issue but maybe it helps:
https://github.com/oracle/graal/issues/1724
I wonder why this has not been fixed yet.
I installed Emscripten through the steps shown below:
1.) Download the emsdk-portable version for Linux/MacOSX
http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#sdk-downloads
2.)
Run
$ ./emsdk update
$ ./emsdk install latest
$ ./emsdk activate latest
$ source emsdk_env.sh (To update your environment variables)
I believe everything installed correctly, however I am unable to run emscripten anywhere outside of the emsdk folder.
I need to be able to run em++ in my: Documents/project3/dataviz/graphiti folder.
Also, when I run em++ -v in my emsdk folder, I get the following message I have been unable to resolve:
Java does not seem to exist, requierd for closure compiler,
which is optional (define JAVA in /home/bryce/.emscripten if you want it)
I attempted to define the java path in the folder, but I'm not sure how it should look.
Any help resolving these two issues would be very much appreciated.
The first problem sounds like the PATH isn't being set correctly. Type echo $PATH after running source emdsk_env.sh and check that the path to your emscripten installation has been added.
Note that you have to export the PATH for each terminal session you're using (it might be an idea to put source <path to emsdk dir>/emsdk_env.sh in your .bashrc file so this gets done automatically).
Could this link help with the second problem?
https://kripken.github.io/emscripten-site/docs/building_from_source/verify_emscripten_environment.html#installing-missing-components
I am trying to update RJava to reflect the latest version of Java 1.8 on my mac. I think I found the right information in doing so but the issue arises when I use 'Terminal' to run some code. I have to run:
sudo R CMD javareconf -n
but I receive an error of:
sudo: R: command not found
I found some information online and I found out I need to change the path in Terminal. I found out that the path where R is '/usr/bin/R'. When I changed the path using the command:
export PATH=/usr/bin/R:$PATH
and then tried to run the code again; I got no where and I am out of luck. I don't understand what the code is but I can only assuming what it does. Hopefully I can get some insight on how I can change the path so I can update rJava to the updated Java Version. Thank you for anyone's time.
The PATH setting would be PATH=/usr/bin:$PATH or you even easier
sudo /usr/bin/R CMD javareconf
Note that -n wouldn't do anything so you probably didn't mean that. Also if you don't even have /usr/bin on your PATH, you have probably even bigger issues since you also need to find java in the first place. In cases like that you may have better luck using sudo -i and then using the shell to fix whatever env vars are not setup correctly in your system.
I have problems after uninstalling jdk 7 on mac book pro with rm -rf /Library/Java/JavaVirtualMachines/jdkmajor.minor.macro[_update].jdk
I also have installed java 8 and Intellij works well. But any attempt to run java -version or mvn crashes with error:
dyld: could not load inserted library '/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/libjsig.dylib' because image not found
[1] 1216 trace trap mvn
And in the same time I can build all the projects with IntelliJ.
I even can't run vim - I have the same mistake.
So, my questions:
1. What is the correct way to uninstall JDK?
2. What should I do in my situation to restore the system?
As mentioned by mattias in his answer, your problem stems from a command in one of your bash startup files, that tells bash to load certain dynamic libraries before it attempts to run any command.
Using unset DYLD_INSERT_LIBRARIES will only solve this temporarily, for the current running terminal. So you should fix the problem permanently, by first running that command, and then editing your .bash_profile and .bashrc files with vim or nano.
If you see a line that says
export DYLD_INSERT_LIBRARIES=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/libjsig.dylib
just remove this line. If it inserts any additional libraries in addition to that libraries, just erase this particular library from /Library to libsig.dylib including the following : (if it's the last one, then the preceding :).
Exit Terminal, run it again and make sure your problem has been solved.
The procedure you have been following for removing the JDK is the correct one as suggested by Oracle. The problem was that once in the history of that machine, you or whoever was using it added that library to the DYLD_INSERT_LIBRARIES environment variable and this caused the problem. Also, the reason why this did not affect IntelliJ is that it is not running through bash, so bash commands do not affect it.
If you want to remove any other Java version, you should do the same as you did before, but make sure in advance that nothing in DYLD_INSERT_LIBRARIES refers to something inside /Library/Java/JavaVirtualMachines.
Have a look in your .bash_profile and try to look for
export DYLD_INSERT_LIBRARIES=/usr/lib/libSaturnFE.dylib
export DYLD_FORCE_FLAT_NAMESPACE=1
or anything similar. These might be causing the problem you experience.
Try commenting them out and reload your bash with
exec bash
and see if the problem persist.
I tried to install protocol buffer compiler - Java in Ubuntu through reading README.txt file .
First i typed the following commands:
./configure
then
make
then
make check
then
make install
then
protoc --java_out=src/main/java -I../src \../src/google/protobuf/descriptor.proto
In this last step i have a problem that I don't know which paths should I put in this command.
protoc(1) --java_out=src/main/java(2) -I../src(3) ../src/google/protobuf/descriptor.proto(4)
protoc: main program
--java_out=OUT_DIR: Generate Java source files in OUT_DIR path (must exists).
-I (--proto_path) optional: Specify the directory in which to search for imports. May be specified multiple times; directories will be searched in order. If not given, the current working directory is used.
Your .proto descriptor file.
But you can simplify the command line with
protoc --java_out=src/main/java /path/to/my/proto/myproto.proto