I'm trying to create my custom C# minecraft launcher but I have this error.
I created a launcher.bat file first in order to solve this problem quicker.
I have this code to start minecraft:
java
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
-cp
C:\Users\Davide\AppData\Roaming\.minecraft\versions\1.7.10\1.7.10.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\15.0\guava-15.0.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\mojang\authlib\1.5.21\authlib-1.5.21.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1\lwjgl-2.9.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1\lwjgl_util-2.9.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\lwjgl-platform-2.9.1-natives-windows.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch\5.16\twitch-5.16.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-platform\5.16\twitch-platform-5.16-natives-windows-64.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-external-platform\4.5\twitch-external-platform-4.5-natives-windows-64.jar;
net.minecraft.client.main.Main
--username MYUSERNAME
--accessToken MYACCESSTOKEN
--version 1.7.10
--gameDir C:\Users\Davide\AppData\Roaming\.minecraft
--assetsDir C:\Users\Davide\AppData\Roaming\.minecraft\assets
--userProperties {}
--uuid MYUUID
But when i start it says Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.
I found on the internet that's a problem of this line
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
But I double checked the path is correct.
Thank you in advance.
EDIT
I solved this problem easily taking out this from the arguments:
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
And putting al the DLL's in the local folder, i can't still access them with the full path though
Ok i found the answer. I had to use the local path and not the absolute one
Related
I am new to Axis , I am trying to start Axis2 as a Standalone Server using the Standard Binary Distribution package in Linux. I went through this guide: https://axis.apache.org/axis2/java/core/docs/installationguide.html
I have downloaded and unpacked the distribution in it's own directory and i have also set environment variables AXIS2_HOME and JAVA_HOME as follows :
export AXIS2_HOME=/opt/axis2-1.8.2
echo $AXIS2_HOME returns
/opt/axis2-1.8.2
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
echo $JAVA_HOME returns
/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
When trying to run axis2server.sh which is essentially the script to start the server I get the following prompts :
user#serverFoo/opt/axis2-1.8.2/bin$ ./axis2server.sh
Using AXIS2_HOME: /opt/axis2-1.8.2
Using JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin
Error: Could not find or load main class org.apache.axis2.transport.SimpleAxis2Server
Coming from a JAVA background I understand that it can't find or load the server class, although I can't find any resources in the web pointing to the specific error .
EDIT : I have also added CLASSPATH variable pointing to the AXIS2_HOME/lib directory i.e
export CLASSPATH=/opt/axis2-1.8.2/lib/*.jar but still the same .
Any ideas would be welcome.
Thanks
I code a JNI demo in mac, I found java System.loadLibrary() load failed in mac, but System.load() works fine.I have tried some way to solve this problem, but didn't work, can someone give me advice.there are ways I have tried:
1、set "-Djava.library.path=/Users/wang/javaPrj/AndroidPushServer/out/production" in IDEA "debug-Configurations-VM Options",the running log as follow: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java -Djava.library.path=/Users/wang/javaPrj/AndroidPushServer/out/production -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/charsets.jar ... /Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.yuwan.androidpushserver.server
/Users/wang/javaPrj/AndroidPushServer/out/production
Exception in thread "main" java.lang.UnsatisfiedLinkError: no push in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
...
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:123)
Process finished with exit code 1
the libpush.so is exists in that directory:
lxr:production wang$ pwd
/Users/wang/javaPrj/AndroidPushServer/out/production
lxr:production wang$
lxr:production wang$ ls
AndroidPushServer libpush.so
lxr:production wang$
2、I run java in command "java -Djava.library.path=/Users/wang/javaPrj/AndroidPushServer/out/production com/yuwan/androidpushserver/server", the error as follow:
lxr:AndroidPushServer wang$ java -Djava.library.path=/Users/wang/javaPrj/AndroidPushServer/out/production com/yuwan/androidpushserver/server
/Users/wang/javaPrj/AndroidPushServer/out/production
Exception in thread "main" java.lang.UnsatisfiedLinkError: no push in java.library.path
...
at com.yuwan.androidpushserver.server.(server.java:13)
lxr:AndroidPushServer wang$
3、I set java.library.path in java code by call System.setProperty("java.library.path", "/Users/wang/javaPrj/AndroidPushServer/out/production"), but still load fail.
Take a look here for a sample code that uses JNI and IDEA:
http://jnicookbook.owsiak.org/recipe-No-D002/
You can find super simple source code here as well:
http://jnicookbook.owsiak.org/recipe-No-001/
And you can take a look at the movie that shows how to deal with JNI debugging within IntelliJ and CLion here:
https://www.youtube.com/channel/UCE2aYTLqPQ8Qx8oTkOjjwSQ
If you do System.loadLibrary("push") in mac os X it will load libpush.dylib not libpush.so. If you do System.load you can load any file name you want.
I just installed java 8 and maven on Mac El Captain. I have set all the environment variables correctly and java -version does display the java version. But when I try to run maven from the terminal I get the following error:
File or url '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar' could not be found
java.net.MalformedURLException: no protocol: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at com.werken.forehead.Forehead.loadFileOrUrl(Forehead.java:403)
at com.werken.forehead.Forehead.load(Forehead.java:322)
at com.werken.forehead.Forehead.config(Forehead.java:245)
at com.werken.forehead.Forehead.config(Forehead.java:131)
at com.werken.forehead.Forehead.main(Forehead.java:579)
any ideas?
For Maven 1.x, I found the following bit of the bin/maven shell script caused the same error for me on a Mac:
if $darwin; then
TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Classes/classes.jar"
fi
I simply edited the bin/maven script file and commented out the if $darwin; then ... fi section and it is now working.
The pass where classes
java.net.MalformedURLException: no protocol: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar
I would guess its 'JavaVM.framework' or really amissing protocol like 'file:'
If you installed the JDK in a path like JavaVM.framework, try to installit in another path without '.'
I'm trying to run a complied class with the command:java SocketTest in current directory.
But something wrong:
Exception in thread "main"
java.lang.NoClassDefFoundError:SocketTest(wrong
name:socket/SocketTest)...
here is my classpath AND path configration in windows XP:
JAVA_HOME:
C:\Program Files\Java\jdk1.7.0_25\
classpath:
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
path:
%JAVA_HOME%\jre\bin;C:\Program Files\Java\jdk1.7.0_25\bin;C:\Ruby187\bin;H:\Program Files\ARM\ADSv1_2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
I think the .; has been carefully written,so I'm not sure what's wrong with the java command. Someone help,please!
The error message has pointed out you need to put the your class to the corrected package socket. So you need to create folder with name socket and then put your SocketTest.class to this folder and run the following command (under the parent folder of socket):
java socket.SocketTest
I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06.
But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'.
I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06). Also tried launch application using -Djava.library.path=/path/to/dir.
But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound exception (Eclipse can't find Main class, but I manually point Eclipse to Main class when I laucnh my app))/
Does it work if you copy gsdll64 to your working directory? :-)
if u want to use a system property
-Djna.library.path=/path/to/dir should be used instead of -Djava.library.path=/path/to/dir