Jump to content
  • 0
xilit

Java jre confusion!

Question

I had "A java exception occurred error" and so I changed my run.bat file to this....

@echo off
"C:\Program Files\Java\jre7\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files (x64)\Java\jre7\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; [email protected] off
"C:\Program Files (x64)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files (x86)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
pause

I tried to squeeze in just about everything I can think of, besides 32 bit op system. So that people don't get the error. Now..... they can open the client using jre8 without the error, but not jre7, why is this even though I have jre7 in this run.bat? Also when my friend did download jre8 it finally opened but the client screen went white.... I am trying to make the client open like every other rsps you see out there. Nice and easy don't have to have nothing but java. Which is what I see myself doing. I am still learning, but I am a quick learner, so any help is greatly appreciated! Also on my laptop + desktop have java jre8 and open and run the server just fine. It's just any computer not in my home....


Client if you need to see - [url]https://www.dropbox.com/s/9pnvz01d4xld2hp/Click%20Client.jar[/url]

Skype: cjbeforlife Edited by xilit

Share this post


Link to post
Share on other sites

26 answers to this question

Recommended Posts

  • 0
There are 2 java versions specified in there. 7 and 8, change all of them to the one you're using.

also, to allow them to play with java 7, compile it completely with java 7. dont quote me on that though.


that should fix it :)

Share this post


Link to post
Share on other sites
  • 0
So now it looks like this....

@echo off
"C:\Program Files\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -
XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files (x64)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:
+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp
bin;./clientlibs.jar; [email protected] off
"C:\Program Files (x86)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:
+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp
bin;./clientlibs.jar; Loader
pause

That is changed to what I am using. I need it to be jre7 for those who are not me though. :) So on that note, when you say compile it completely with java 7, you mean change all of the above to jre7, then compile, and have 2 different clients in the end? one for each java?

Share this post


Link to post
Share on other sites
  • 0
[quote name='xilit']So now it looks like this....

@echo off
"C:\Program Files\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:+CreateMinidumpOnCrash -
XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp bin;./clientlibs.jar; Loader
"C:\Program Files (x64)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:
+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp
bin;./clientlibs.jar; [email protected] off
"C:\Program Files (x86)\Java\jre8\bin\java.exe" -Xmx256m -Xss2m -Dsun.java2d.noddraw=true -XX:
+CreateMinidumpOnCrash -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -cp
bin;./clientlibs.jar; Loader
pause

That is changed to what I am using. I need it to be jre7 for those who are not me though. :) So on that note, when you say compile it completely with java 7, you mean change all of the above to jre7, then compile, and have 2 different clients in the end? one for each java?[/QUOTE]


Why on earth do you need it to be jre7 for people who are not you.

Obviously there has to be something wrong with your client or your compiler.

Share this post


Link to post
Share on other sites
  • 0
Because when its set to jre8, and people have jre7 I would like them to be able to join. And the compiler had class 466 errors and I fixed them. So now all I have is a few warnings. Are you saying that I need to just tell people to download jre8? Because I would prefer people to just be able to play with their current Java instead of going through the trouble to download it. And from my experience so far, unless you go download Java 8 you will have Java 7. When people go to "download Java" they get version 7 update 60. So I have to direct them to Java 8 for it to work. Being that Java 7 in my run.bat doesn't seem to be working.... If there is something wrong with my client what would cause this.... Edited by xilit

Share this post


Link to post
Share on other sites
  • 0
If you compile with java 8 you can only play with java 8+. Compile with java 7 (JDK) and it should work fine. Java 7 code will also run fine under java 8.

EDIT:
Take in account that certain code (specific to java 8) will not be accepted for java 7. And libraries who are updated for java 8 MAY or MAY NOT work on java 7. In case of errors there is a very likely chance you have to downgrade your libraries. However I doubt it since 718 servers (if not updated) are made for java 7. Edited by Arix

Share this post


Link to post
Share on other sites
  • 0
I understand, I will download JDK 7 and see if that doesn't change everything up! I really appreciate the help!

Share this post


Link to post
Share on other sites
  • 0
[quote name='Arix']If you compile with java 8 you can only play with java 8+. Compile with java 7 (JDK) and it should work fine. Java 7 code will also run fine under java 8.

EDIT:
Take in account that certain code (specific to java 8) will not be accepted for java 7. And libraries who are updated for java 8 MAY or MAY NOT work on java 7. In case of errors there is a very likely chance you have to downgrade your libraries. However I doubt it since 718 servers (if not updated) are made for java 7.[/QUOTE]

Ok now I just get a white screen when the client pulls up, which I am guessing is what my friend was mentioning. And I get this error....

The system cannot find the path specified.
The system cannot find the path specified.
Exception in thread "main" java.lang.UnsupportedClassVersionError: client : Unsu
pported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at Loader.startClient(Loader.java:116)
at Loader.doFrame(Loader.java:52)
at Loader.main(Loader.java:36)

And my compiler gives me this....


src\Class466.java:6: error: package netscape.javascript does not exist
import netscape.javascript.JSObject;
^
src\Class457.java:78: warning: Win32GraphicsDevice is internal proprietary API a
nd may be removed in a future release
Field field = sun.awt.Win32GraphicsDevice.class.
getDeclaredField("valid");
^
src\Class457.java:93: warning: Win32GraphicsDevice is internal proprietary API a
nd may be removed in a future release
Field field = sun.awt.Win32Graph
icsDevice.class.getDeclaredField("valid");
^
src\Class457.java:103: warning: Win32GraphicsDevice is internal proprietary API
and may be removed in a future release
Field field = sun.awt.Win32GraphicsDevic
e.class.getDeclaredField("valid");
^
src\Class138_Sub1.java:14: warning: Unsafe is internal proprietary API and may b
e removed in a future release
static int anInt7000 = 7;
^
src\Class_ra_Sub3.java:35: warning: Unsafe is internal proprietary API and may b
e removed in a future release
public Unsafe anUnsafe8219;
^
src\Class_ra_Sub3.java:5: warning: Unsafe is internal proprietary API and may be
removed in a future release
import java.nio.ByteBuffer;
^
src\Class_ra_Sub3.java:2864: warning: Unsafe is internal proprietary API and may
be removed in a future release
Field field = sun.misc.Unsafe.class.getDeclaredF
ield("theUnsafe");
^
src\Class_ra_Sub3.java:2866: warning: Unsafe is internal proprietary API and may
be removed in a future release
anUnsafe8219 = (Unsafe) field.get(null);
^
src\Class387_Sub3.java:157: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_7894.anUns
afe8219;
^
src\Class387_Sub3.java:2636: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2668: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2815: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2854: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class481_Sub1.java:74: warning: AuthenticationInfo is internal proprietary A
PI and may be removed in a future release
Class var_class = sun.net.[url]www.protocol.h[/url]
ttp.AuthenticationInfo.class;

^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
14 warnings
src\Class466.java:6: error: package netscape.javascript does not exist
import netscape.javascript.JSObject;
^
src\Class457.java:78: warning: Win32GraphicsDevice is internal proprietary API a
nd may be removed in a future release
Field field = sun.awt.Win32GraphicsDevice.class.
getDeclaredField("valid");
^
src\Class457.java:93: warning: Win32GraphicsDevice is internal proprietary API a
nd may be removed in a future release
Field field = sun.awt.Win32Graph
icsDevice.class.getDeclaredField("valid");
^
src\Class457.java:103: warning: Win32GraphicsDevice is internal proprietary API
and may be removed in a future release
Field field = sun.awt.Win32GraphicsDevic
e.class.getDeclaredField("valid");
^
src\Class138_Sub1.java:14: warning: Unsafe is internal proprietary API and may b
e removed in a future release
static int anInt7000 = 7;
^
src\Class_ra_Sub3.java:35: warning: Unsafe is internal proprietary API and may b
e removed in a future release
public Unsafe anUnsafe8219;
^
src\Class_ra_Sub3.java:5: warning: Unsafe is internal proprietary API and may be
removed in a future release
import java.nio.ByteBuffer;
^
src\Class_ra_Sub3.java:2864: warning: Unsafe is internal proprietary API and may
be removed in a future release
Field field = sun.misc.Unsafe.class.getDeclaredF
ield("theUnsafe");
^
src\Class_ra_Sub3.java:2866: warning: Unsafe is internal proprietary API and may
be removed in a future release
anUnsafe8219 = (Unsafe) field.get(null);
^
src\Class387_Sub3.java:157: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_7894.anUns
afe8219;
^
src\Class387_Sub3.java:2636: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2668: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2815: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class387_Sub3.java:2854: warning: Unsafe is internal proprietary API and may
be removed in a future release
Unsafe unsafe = ((Class387_Sub3) this).aClass_ra_Sub3_78
94.anUnsafe8219;
^
src\Class481_Sub1.java:74: warning: AuthenticationInfo is internal proprietary A
PI and may be removed in a future release
Class var_class = sun.net.[url]www.protocol.h[/url]
ttp.AuthenticationInfo.class;

^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
14 warnings
Press any key to continue . . .

When I was compiling with Java 8 I never got this error, I got the normal class 466 error and fixed it, so now I have a new class 466 error I have not seen yet. It has always given me the warnings. But now I cannot even play the client. :P

Share this post


Link to post
Share on other sites
  • 0
Stop foolin' around and use an [URL="http://eclipse.org/downloads"]IDE[/URL].

You only have 1 error anyway, and it's a package error.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hope']Stop foolin' around and use an [URL="http://eclipse.org/downloads"]IDE[/URL].

You only have 1 error anyway, and it's a package error.[/QUOTE]

I have Eclipse I am just not very familiar with it. And I am trying to release the client to others, they wouldn't know what to do?

Share this post


Link to post
Share on other sites
  • 0
[quote name='xilit']I have Eclipse I am just not very familiar with it. And I am trying to release the client to others, they wouldn't know what to do?[/QUOTE]

What do you mean they wouldn't know what to do? All they have to do is double click the jar file lmao.

Share this post


Link to post
Share on other sites

×