Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet not takes latest JRE

 
vinothkumar devarajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I complied all my java class files in JRE 1.6.0.17 and maked as jar file [ex: drawingAppletV1210.jar. This file is used in Applet. When I tried to run in JRE 1.7 it is not working. It requires 1.6.0.17. Is it possible to take latest JRE.

MY JSP Code :

<OBJECT ID="appletDraw" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="<%=appWidth%>" height="<%=appHeight%>" border="0" >
<PARAM name="java_code" value="class path mentioned">
<PARAM name="java_codebase" value="/applets">
<PARAM name="java_archive" value="drawingApplet<%=BUILD_VERSION%>.jar">
<PARAM name="type" value="application/x-java-applet;version=1.3">
<param name="persistState" value="false" />
<param name="cache_option" value="no"/>
<PARAM name="mayscript" value="true">

Here in the above code I have mentioned to take latest JRE but while execution it requires 1.6.0.17. If I have exact JRE version it is working.

If I don't have the exact version it is not working. If I need to take latest JRE what code do I need to modify?


Kindly any one help on this.
 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Java code compiled under one compiler will run on JRE's of the same version as the compiler and all later versions so if you have compiled for version 1.6 it will work on JRE 1.6, JRE 1.7, JRE 1.8 etc.

Please can you show the error message you are getting.
 
vinothkumar devarajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I execute Applet in IE I am getting message as : JAVA Plugin is required to run the applet post

Kindly find the below jsp code

<META name="GENERATOR" content="IBM WebSphere Studio">
</head>
<body scroll="no">
<OBJECT ID="appletDraw" classid="<%=pp.tools.Version.APPLET_JRE_VERSION%>" width="<%=appWidth%>" height="<%=appHeight%>" border="0" >
<PARAM name="java_code" value="/drawingapplet/DrawingApplet">
<PARAM name="java_codebase" value="/applets">
<PARAM name="java_archive" value="drawingApplet<%=pp.tools.Version.BUILD_VERSION%>.jar">
<PARAM name="type" value="application/x-java-applet;version=1.3">
<param name="persistState" value="false" />
<param name="cache_option" value="no"/>
<PARAM name="mayscript" value="true">

<% String sServerName=""; try {sServerName = java.net.InetAddress.getLocalHost().getHostName();}catch (java.net.UnknownHostException e){} %>
<PARAM name="AS" value="<%=sServerName%>">
<PARAM name="BUILD_VERSION" value="<%=renault.ppm.tools.Version.BUILD_VERSION%>">

<COMMENT>
</COMMENT>
<hr>
<center>
<font color="#3333FF" size="2" face="Arial">JAVA Plugin is required to run the applet post</font>
</center>

</NOEMBED></EMBED>
</OBJECT>

Let me know if you need more information.
 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What browser are you using?
Your JSP's object tag is configured for IE only, if you want to use a Mozilla family browser you need to add some info in the Comment tag.
See this guide on what to add: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/applet/using_tags.html
 
vinothkumar devarajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using only IE 11. I am not expecting applet to run in Mozilla. Even in IE it is not working. Any code changes required for this in JSP side ?

 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The information I gave earlier about versioning may not be correct for applets any more. It appears this behaviour was changed in version 1.5 update 6 and now you have to specifiy the version of the plugin you are compiled for.
See http://www.oracle.com/technetwork/java/javase/family-clsid-140615.html

Try using classid="clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA". This specifies the plugin to use is version 1.6 or later.
 
vinothkumar devarajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have modified the class id in jsp file as above mentioned still I am not able to open my applet. It requires 1.6 JRE installed in my machine.

I have uninstalled 1.6 and currently I am having only 1.7 version. Still the problem exist any other alternate way to solve this issue.

While building JAR using ANT I am using fork = "true" executable="..\jdk1.6.0_17\bin\javac". Is this should be modified ?
 
Tony Docherty
Bartender
Posts: 3054
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I can't think of anything else that would help other than recompiling the applet with a ver 1.7 compiler but then you wouldn't be able to use it under 1.6

Hopefully someone else will be able to help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic