Page 1 of 1

Server in VPS

Posted: Mon Oct 17, 2011 9:41 am
by daimonass
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:5013
L2JDP Revision Number:8467


Hi, when i start server in vps, I get this error in login and gameserver:

Code: Select all

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/l2jserver/gameserver/GameServer : Unsupported major.minor version 51.0        at java.lang.ClassLoader.defineClass1(Native Method)        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)        at java.security.AccessController.doPrivileged(Native Method)        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)Could not find the main class: com.l2jserver.gameserver.GameServer.  Program will exit.root@server:~/login# Exception in thread "main" java.lang.UnsupportedClassVersionError: com/l2jserver/gameserver/GameServer : Unsupported major.minor version

http://www.java.net/node/664117 - i need to compiled with old java version (1.6 jdk), becose i failure instal in vps java 1.7. But, then i compiled L2j_server i have this error:

Code: Select all

BUILD FAILEDC:\Users\Admin\Desktop\server\L2J_Server\build.xml:179: Java 1.7 is required. But your version is Java 1.6 and probably JDK is not installed. 
Question: How i can compiled in 1.6 java, or how to instal java 1.7 in vps (debian).

P.S I now, my english really bad, but otherwise i can't.

Re: Server in VPS

Posted: Tue Oct 18, 2011 5:18 am
by asumos
here is what i use ( i use openjdk instead of sun's jdk both work the same just install paths difer )

1. Download binaries from http://download.java.net/openjdk/jdk7/

Alternatively, open a terminal and type:

for 32 bit OS:
wget http://www.java.net/download/jdk7/archi ... n_2011.bin
for 64 bit OS:
wget http://www.java.net/download/jdk7/archi ... n_2011.bin

2. Run the previously downloaded self-extracting .bin file (first make sure you have executing permissions by chmodding those files to have +x access), by typing in the command line:

for 32 bit OS
./jdk-7-ea-bin-b125-linux-i586-13_jan_2011.bin
for 64 bit OS
./jdk-7-ea-bin-b125-linux-x64-13_jan_2011.bin

Accept the license agreement by writing “yes” in the command line and the JDK 7 will unpack itself in the same folder as the .bin file . You are required to press “enter” to finish unpacking.

3. Move the newly unpacked jdk1.7.0 folder to the /opt/jvm/ folder – creating /opt/jvm folder first:

sudo mkdir /opt/jvm ; sudo mv jdk1.7.0 /opt/jvm

If you have more than one JDK’s installed, type:

sudo update-alternatives –-config java.

This will get you a list of the installed JDK’s and their indexes. To install JDK 7 you just type:

sudo update-alternatives –-install /usr/bin/java java /opt/jvm/jdk1.7.0/jre/bin/java 2

where 2 is the next unused index from the previous command. This should be repeated for javac and javadoc if you are going to use them via the command line. Finally check that the proper Java is installed by typing:

java -version

Re: Server in VPS

Posted: Tue Oct 18, 2011 6:27 am
by MELERIX
lol guys, these version of Java (even is 7), are outdated.

official website is on oracle: http://www.oracle.com/technetwork/java/ ... index.html

next time check the guides: viewtopic.php?f=2&t=10719