classpath

Mix --class-path and --module-path in javac (JDK 9)

 ̄綄美尐妖づ 提交于 2019-12-19 04:46:07
问题 I tried to follow this question but it does`t work for me. I want to compile 1 module (which does not requires any other module or jar) together with other classes which use this module and will be in unnamed module. javac -cp lib\* --module-path modules --add-modules simpleModule -d out @classes.txt After I run this command I get " package org.... does not exist". But jar with this package is in lib directory lib - directory with my libraries-jars modules - this folder contains module

How can I permanently add a class path to my Mac terminal?

只愿长相守 提交于 2019-12-19 03:21:14
问题 I want to set my path permanently for the following directory: /Users/syalam/Library/android-sdk-mac_86/platform-tools Not sure how to do it from the terminal. I tried: export PATH=$PATH:/Users/syalam/Library/android-sdk-mac_86/platform-tools but it only works temporarily. After I close my shell it no longer exists. 回答1: Just add this entry to your CLASSPATH environment variable in your .bashrc : export CLASSPATH="/Users/syalam/Library/android-sdk-mac_86/platform-tools:$CLASSPATH" 回答2: http:/

How can I permanently add a class path to my Mac terminal?

荒凉一梦 提交于 2019-12-19 03:20:04
问题 I want to set my path permanently for the following directory: /Users/syalam/Library/android-sdk-mac_86/platform-tools Not sure how to do it from the terminal. I tried: export PATH=$PATH:/Users/syalam/Library/android-sdk-mac_86/platform-tools but it only works temporarily. After I close my shell it no longer exists. 回答1: Just add this entry to your CLASSPATH environment variable in your .bashrc : export CLASSPATH="/Users/syalam/Library/android-sdk-mac_86/platform-tools:$CLASSPATH" 回答2: http:/

ClassNotFoundException when using custom SSLSocketFactory

眉间皱痕 提交于 2019-12-18 19:05:35
问题 I have created a custom SSLSocketFactory class and set it as below ldapEnv.put(Context.SECURITY_PROTOCOL, "ssl"); ldapEnv.put(FACTORY_SOCKET, socketFactoryClass); LdapContext ldapContext = new InitialLdapContext(ldapEnv, null); It works fine when running from Eclipse Dev Environment, and running it as Jar file from command prompt. But it doesn't work when I wrap it inside a service wrapper and launch it as Windows Service. I get the following exception, javax.naming.CommunicationException:

Too long line in manifest file while trying to create jar

大兔子大兔子 提交于 2019-12-18 18:56:12
问题 I am getting a too long line error while trying to build a jar. the long line in the manifest file is the Class-Path line as the application uses a lot of third-party libraries. needless to say, I am using Windows :-( and Eclipse Java 1.6 I tried Class-Path: lib or Class-Path: lib/ but they did not work. 回答1: The classpath is too long due to the number of jar files in it. «No line may be longer than 72 bytes (not characters), in its UTF8-encoded form.» [from docs: java 5, java 8; «Line length

Unable to locate the Javac Compiler

北城以北 提交于 2019-12-18 13:08:09
问题 I tried to mvn install and got this message: Compilation failure Unable to locate the Javac Compiler in: /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required). In most cases you can change the location of your Java installation by setting the JAVA_HOME environment variable. Well, there is an open jdk, I also downloaded another one. I tried to point JAVA_HOME to both, now it is set:

Eclipse: Adding all the jars from a folder in java classpath

牧云@^-^@ 提交于 2019-12-18 12:47:35
问题 Is there a way to include all the jar files within a directory in the classpath using Eclipse? It can be done by using command line by the following command: java -cp "lib/*" my.package.Main But how can it be done from eclipse? EDIT: I edited the .classpath entry in my project floder as: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="F:

GWT, Eclipse Plugin how to rename project along with .gwt.xml file? Am getting error when try to do so

亡梦爱人 提交于 2019-12-18 12:36:28
问题 I've spent a while searching on this and nothing that I find seems relevant specifically to my issue. I am making RPC calls so I wanted to change the path to one of my web services. It was something like mytestproject and wanted to change it to finalprojectname I went to the mytestproject.gwt.xml file and changed <module rename-to='mytestproject'> to <module rename-to='finalprojectname'> I then ran it through and got an error that [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt

GWT, Eclipse Plugin how to rename project along with .gwt.xml file? Am getting error when try to do so

丶灬走出姿态 提交于 2019-12-18 12:36:12
问题 I've spent a while searching on this and nothing that I find seems relevant specifically to my issue. I am making RPC calls so I wanted to change the path to one of my web services. It was something like mytestproject and wanted to change it to finalprojectname I went to the mytestproject.gwt.xml file and changed <module rename-to='mytestproject'> to <module rename-to='finalprojectname'> I then ran it through and got an error that [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt

Is there a tool to discover if the same class exists in multiple jars in the classpath?

自作多情 提交于 2019-12-18 12:13:12
问题 If you have two jars in your classpath that contain different versions of the same class, the classpath order becomes critical. I am looking for a tool that can detect and flag such potential conflicts in a given classpath or set of folders. Certainly a script that starts: classes=`mktemp` for i in `find . -name "*.jar"` do echo "File: $i" > $classes jar tf $i > $classes ... done with some clever sort/uniq/diff/grep/awk later on has potential, but I was wondering if anyone knows of any