Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unrecognized option: -server 1

Status
Not open for further replies.

tubbycub

MIS
Feb 10, 2003
26
0
0
CN
Hi,

Does anyone knows what is causing the following error and how to resolve it?

Unrecognized option: -server
Could not create the Java virtual machine.

I had installed J2SE on a Solaris 8 platform and applied the recommended patches. Everytime I tried to run a java based application I will get the above error.

eg. java -server MyApp

Thanks in advance
 
tubbycub,

The error indicates that the JVM you're running does not recognize the -server switch. Perhaps you're not running the JVM you think you are.

Check the version of the JVM with:
java -version

If it is not what you expected, an older copy of java is being found in the path before your most recently installed copy. You can see where this mystery jvm resides with the posix which command:
which java

Possible solutions include removing the older version(s) of java, removing the old java directories from your path, or calling your new JVM with the complete path.


Best of luck,
Jason
 
Hi Jason,

Thanks for responding.

Here are the results:

$java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_06, native threads, sunwjit)

$which java
/usr/bin/java

The java version was definitely what was not expected as I had installed the Java(TM) 2 Runtime Environment 1.3.1 and no Java hotspot was found even though I had already installed it. I think you have hit the nail on the head.

You've suggested:
"Possible solutions include removing the older version(s) of java, removing the old java directories from your path, or calling your new JVM with the complete path."

Do I have to do a pkgrm SUNWjit?

I am still very new to this and I am not sure as to how to go about doing it, could you explain in detail or point me to a website that does that?

Thanks a lot!



 
Thanks, I managed to solve it by removing java and creating a symbolic link to j2se.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top