Editing Game's End Titles via .class file

I feel idiotic posting this request, but I'm at a loss as to where else to turn.
I downloaded a game called Gopher Bash from this link -
http://www.javafile.com/games/gopher/gopher.php
I've modified the graphics to make it French Bulldog centered for my website, but I simply can't figure out how to edit the .class file to change the closing credits which say 'Gophers ruined your yard'. I tried simply changing the text where it appeared in the file, but this simply caused the entire thing to not work.
If anyone can stop giggling long enough to take a look at this for me, I'd be very appreciative
ps: I'd happily post the .class file details, but I'm not sure which editor to open it and paste it with. I'm using notepad or dreamweaver to edit it, both of which seem to change it in to nonsense...
Thanks in advance,
Carol
ps: in case this helps to clarify things...I've uploaded it into a folder:
Link to the sample game:
http://www.frenchbulldogz.com/gopher/Untitled-1.htm
Link to the .class files:
http://www.frenchbulldogz.com/gopher/goph.class
http://www.frenchbulldogz.com/gopher/goph$ganim.class

Plagarism? Pardon me, but how dare you accuse me of plagarism?How dare you accuse anyone of accusing anyone of anything.
jwenting simply stated that "plagairism is not something we're going to be helping you with."
(now we have two different ways of misspelling plagiarism)
I would never remove the author's
credit, and have no idea of taking this application
and claiming I wrote it, which is what you are
implying.No, that is what you are inferring.
That's a terrible and strong accusation to level
against someone you don't even know.I don't see an accusation, just a guarded statement implying why no further help was likely to follow.
Not to mention the fact that, if I'm not even capable of altering
the stupid end credit, what on earth makes you think
I'm going to be adept enough to lift their code for
my own nefarious purposes?Nobody claimed you were. ^_^
Plagarism boy ... owes me an apology.AFAICT, nobody owes you an apology, quite the contrary.

Similar Messages

  • Java .class files low-level (hex) editing?

    Hello, all!
    I have a problem:
    There is an application (namely a J2ME instant messanger for Nokia mobiles). It is a non-commercial application. But unfortunately, there is a bad bug in the application. It is not even a bug, it is more a feature - but it does not support Russian (cyrillic) characters encoding. Russian characters in all incoming messages are displayed with a kind of hierogliphs.
    I wrote to developers (and not only I did - I know at least 3 russian people who also wrote a developer about this) - but unsuccessful. Developer keeps silent.
    So what I decided is to fix the bug by myself :) By decompilation, e t.c.
    Unfortunally, the midlet is hard obfuscated :( So it took me some hours of reading obfuscated code, and now I see some ways which I must try to solve the problem. I think I must write a code which processes the desired String variables (Despite obfuscation, I can see which Strings to process to obtain effect), and inject this code somewhere to be executed, and from where it could reach the desired Strings.
    But the great problem is that obfuscated classes produce a lot of erroneus code, which can not be compiled back. So I decide to reject the decompilation at all, or at least of the big classes (where it is a lot of errors, which I can not correct manually).
    In some moments, the application stores the desired Strings in the java.lang.Hashmap. So if I could place my processing code into the Hashmap methods, then I could easily process what I need.
    Evidently, I can not edit the real basic java classes. But why not to make the applicaton using my class with identical functionality, instead of java.jang.Hashmap?
    My idea now is to edit the .class file of the midlet (yeah, edit with notepad), replacing all the references to "java/lang/Hashmap" or "java.lang.Hasmap" with "java/lang/Fuckmap" and "java.lang.Fuckmap".
    So did I (replaced it in norepad).
    I read the Sun's documentation about .class file structure, and it seems that nothing is against it. There is no encryption, no checksums, e t.c.
    Then I produced "Fuckmap" class this way:
    import java.lang.Hashmap;
    class Fuckmap extends Hashmap {}
    (compiled and preverified it of course)
    And placed it into java/lang folder inside the application jar.
    I instead of working properly, I get the "Application error - invalid constant pool entry"). What do I do wrong?

    2 lexzeus, mlk:
    I understood you.
    I jave just tried it, and used "jaga/util/Fuckmap" (jaga, not java). But still the same ("Invalid constant pool entry). I tried two times (maybe I could make something wrong?), both times took "clean" jar package, e t.c.
    Do you really think jav.alang.Hashmap should help now? I have ony little hope :(

  • Edit a class file in Eclipse

    I am new to Java and Eclipse and Weblogic.
    I was give a .war file and told to simply edit a parameter that they thought was in one of the .jsp pages in the war file.
    the only occurance of the parameter name "SearchProvider" is in the Search.class file located deep in folders under the WEB-INF folder.
    the only way i could even find the parameter "SearchProvider" was with the use of an Effective File Search trial software.
    I opened (barely) the Search.class file with windows notepad and its mostly jibberish but I can find the reference to "SearchProvider" in the class file.
    I need to change this parameter.
    When I import this into eclipse, I get the message there is no source file attached to the class file Search.class.
    I added the entire class folder into the library. I tried to change the class source but all I have are just the files in the .war package.
    I have tried changing the extension to .jar and this will let me add these files as a project, but I cannot edit this Search.class file no matter what I try.
    My basic question is, Am I missing files from the client? Do I need more than just a war file?

    Most likely you are searching the wrong place, on an web application the first place to start searching is the web.xml, it is the core configuration file it will tell everything about your application including which other tecnologies are being used, like struts, it is very likely that the answer to your question lies in the web.xml file.

  • How can i remove the page title above the File,Edit,View,History,Bookmark tab?

    how can i remove the page title above the File,Edit,View,History,Bookmark tab in firefox

    In Firefox 29 and Firefox 30:
    "3-bar" menu button > Customize
    In the lower left, click the Title Bar button to switch the title on and off.
    In Firefox 28, I actually can't remember!
    I would be remiss if I didn't remind you:
    * Firefox 28 is not secure: Mozilla has disclosed its [https://www.mozilla.org/security/known-vulnerabilities/firefox.html known security flaws].
    * You can modify Firefox 30 to restore many of the UI features of earlier versions of Firefox using the techniques in the following article (and/or with assistance from forum volunteers): [[How to make the new Firefox look like the old Firefox]].

  • Extra bytes at the end of class file listeners/SessionListener ?

    wen i am running my JSP pages i am getting this error...
    can anybody explain this error, Y it is comming...
    SEVERE: Error configuring application listener of class listeners.SessionListener
    java.lang.ClassFormatError: Extra bytes at the end of class file listeners/SessionListener
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Jun 24, 2008 10:58:29 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Skipped installing application listeners due to previous error(s)

    The class files are broken. Recompile them. If you're uploading them, doublecheck if the FTP program used doesn't do mad things with binary files.

  • Editing .class files

    Hi
    I am kind of new to Java etc
    I would like to know if it is possible to edit a .class file if you don't have the .java file?
    If this is possible do I require any software etc?
    Thanks in advance for your help
    James

    Assuming from the "I am kind of new to Java" part
    of the original post that raw-binary-editing is
    not an option, try running a decompiler such as
    Mocha, http://www.brouhaha.com/~eric/computers/mocha.html
    (which is open-source and free :)
    Please note that while decompilers do indeed return
    java source from the .class files you pass in, the
    original variable names are lost and as such, code
    can look unstructured and be hard to follow.
    However they do what you asked, so have fun :)

  • Extra bytes at the end of class file error

    I have created an applet.
    it worked fine when i ran it with appletviewer.
    it ran fine when i opened it with a browser (when it still was on my computer and not on the net).
    now, when i uploaded all the files, when try to open the page where my applet should be, the applet doesn't start and the console writes:
    java.lang.ClassFormatError: Extra bytes at the end of class file ImageHolderNotifier
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    i tried rebuilding the project and uploading all the .class files from scratch... still, no change :-/
    i have compiled it using eclipse 3.1.0, JDK1.5.0_02.
    my JRE is 1.5.0_02
    i've tried running it both with Internet Explorer and FireFox...

    Works locally but not after uploading.
    Must be uploaded wrong then (ftp ascii??) or it's the web server.

  • Editing Loop Start and End times via automation / MIDI controllers?

    I'm trying to play a sample in EXS24 and have the Sample Start, Loop Start and End times manipulated over the course of the song. I've tried to open up the EXS sample editor, click on the numerical value of the Loop Start, and then attempt to Learn Automation. All it does is assign the knob for the instrument Volume Level. Is there any way to do this? It's basically how an Akai S612 works: http://www.vintagesynth.com/akai/s612.shtml
    I switched gears and tried it also with Battery, and there's a way to map the Start and End times in there, but it's not seeming to work as I've intended. I can't seem to make the loops move as they should and there's ways to use up to 4 loops, but not a way to target each loop's start and end points via separate controllers.
    I could use my S-612 [and probably will], but in moments where I don't have one available, I'd love to find a solution to this.
    Thanks,
    +odd

    Anyone with any thoughts? would be great to solve this.

  • How to edit a ".class" file?  Anyone?

    I hope someone can help me with this...
    Someone gave me a class file to put into my applet. However, I'm wanting to go into the class file and change a few things around. However, I've done just about everything to try to find a way to go into the code of this file to do some changing, and I can't find anything to do it with! I've tried Netbeans and Visual Studio .NET, but it doesn't work. Maybe I'm doing something wrong. Does anyone know how to go into the class file and change it?
    thanks soo much..

    Someone gave me a class file to put into my applet.
    ... Does anyone know how to go
    into the class file and change it? And why can't you ask "someone" for the source? Or ask them to modify it for you?

  • WebLogic looking for class file using the wrong case

    During my ant build, I precompile my JSPs using weblogic.jspc. All of the jars and wars are packaged into an ear and deployed to WebLogic 8.1 on Linux. When I access one of our normal screens, everything is good. Things go wrong when I try to access one of our help screens. We have a base help file that includes another file based on the screen code passed to it. The screen code is used in combination with a HashMap to look up the correct JSP to include. This part goes fine. But when the JSP is included, I get the following error. The best I can figure is that the class file is in mixed case (i.e., SampleHelp00.jsp and SampleHelp00.class), but Weblogic is looking for samplehelp00.class.
    I'm not even where I should begin looking to solve this. Anyone have any ideas?
    ----- BEGIN STACKTRACE -----
    javax.servlet.jsp.JspException:
    [HTTP:101249][ServletContext(id=70634941,name=grp,context-path=/grp)]:
    Servlet class jsp_servlet._help.__samplehelp00 for servlet
    /help/SampleHelp00.jsp could not be loaded because the requested class was not found in the classpath
    /usr/share/weblogic/weblogic81/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/wf-web-sys.wftesttest.war:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/jarfiles/WEB-INF/lib/Struts_Validator-20010702.jar:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/jarfiles/WEB-INF/lib/struts.jar:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/jarfiles/WEB-INF/lib/taglibs-session.jar:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/jarfiles/WEB-INF/lib/wf.wftesttest.jar:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp/jarfiles/_wl_cls_gen.jar:
    /weblogic81sp5/weblogic81sp5/config/wftesttest/webSysServer02/.wlnotdelete/extract/webSysServer02_wf-web-sys.wftesttest_grp.
    java.lang.ClassNotFoundException:
    jsp_servlet._help.__samplehelp00.
    at org.apache.struts.taglib.template.InsertTag.doEndTag()I(InsertTag.java:149)
    at jsp_servlet.__su_hl0._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V(__su_hl0.java:289)
    at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl; )V(ServletStubImpl.java:465)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(ServletStubImpl.java:348)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(RequestDispatcherImpl.java:328)
    at org.apache.struts.action.ActionServlet.processForward(Lorg/apache/struts/action/ActionMapping;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )Z(ActionServlet.java:1847)
    at org.apache.struts.action.ActionServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V(ActionServlet.java:1568)
    at org.apache.struts.action.ActionServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V(ActionServlet.java:491)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V(HttpServlet.java:740)
    at com.clear2pay.ppp.util.ui.struts.ActionServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V(ActionServlet.java:138)
    at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl; )V(ServletStubImpl.java:465)
    at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain; )V(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(FilterChainImpl.java:27)
    at com.clear2pay.ppp.util.ui.SetCharacterEncodingFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain; )V(SetCharacterEncodingFilter.java:150)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse; )V(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6987)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction; )Ljava/lang/Object;(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction; )Ljava/lang/Object;(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl; )V(WebAppServletContext.java:3892)
    at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread; )V(ServletRequestImpl.java:2766)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest; )V(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
    at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread; )V(Unknown Source)
    ----- END STACKTRACE -----
    Message was edited by:
    cabuki

    Ignore the part about precompiled JSPs being ignored on my development server. Turns out I had a stale cache. I cleared that out and now it recognizes the files.
    The problem with that, is now I'm getting an Error 500 when I try to access the page.
    ----- BEGIN STACKTRACE -----
    javax.servlet.jsp.JspException
         at org.apache.struts.taglib.template.InsertTag.doEndTag()I(InsertTag.java:149)
         at jsp_servlet.__su_h0._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )V(__su_h0.java:316)
         at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object; (ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl; )V(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(ServletStubImpl.java:315)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(RequestDispatcherImpl.java:318 )
         at org.apache.struts.action.ActionServlet.processForward(Lorg.apache.struts.action.ActionMapping;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )Z(ActionServlet.java:1847)
         at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )V(ActionServlet.java:1568 )
         at org.apache.struts.action.ActionServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )V(ActionServlet.java:491)
         at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )V(HttpServlet.java:740)
         at com.clear2pay.ppp.util.ui.struts.ActionServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse; )V(ActionServlet.java:138 )
         at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl; )V(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain; )V(TailFilter.java:28 )
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(FilterChainImpl.java:27)
         at com.clear2pay.ppp.util.ui.SetCharacterEncodingFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain; )V(SetCharacterEncodingFilter.java:150)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse; )V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6458 )
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction; )Ljava.lang.Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction; )Ljava.lang.Object;(SecurityManager.java:118 )
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl; )V(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread; )V(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest; )V(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178 )
         at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread; )V(Unknown Source)
    ----- END STACKTRACE -----
    The page in question is just a simple JSP using Struts (v 1.0.2) to call in a template.
    ----- BEGIN JSP -----
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ taglib uri="/WEB-INF/lib/struts.tld" prefix="struts" %>
    <%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri='/WEB-INF/lib/struts-template.tld' prefix='template' %>
    <template:insert template='/t/system.jsp'>
    <template:put name='title'><bean:message key="tit_su_h0"/></template:put>
    <template:put name='sidenav' content='/t/su_snv.jsp'/>
    <template:put name='content' content='/c/su_h0_c.jsp'/>
    <template:put name='footer' content='/t/su_ftr.jsp' />
    </template:insert>
    ----- END JSP -----
    I passed the -keepGenerated flag to the precompile task in my Ant build so I could look at the line it's choking on, but it's not very helpful. I'm stuck. I can set up the build so it doesn't precompile the JSPs, but then the QA team wouldn't like me very much.

  • Windows Trick: Executable Class Files

    This is in "new to java" for a reason.
    I dont want to be flamed for posting something obvious, lol.
    Its just a simple trick to fire up programs by double
    clicking a class file. This is for minor cases that dont warrant an
    executable JAR.
    I was never able to get this working before but i stumbled on this
    tech tip that made it all possible:
    http://blogs.msdn.com/ben/archive/2007/03/09/path-manipulation-in-a-batch-file.aspx
    HOW TO:
    Create a new text file with the following contents:
    @title %~n1
    cd "%~dp1"
    java -cp . %~n1
    Alternately, if you dont want to see the command window at all (like
    with javaw) use this text INSTEAD:
    start "%~n1" /D"%~dp1" javaw -cp . %~n1
    Save this file as "javalauncher.bat" (it has to have a .bat extension).
    Save it into a reliable folder. The java folder is a good place
    for this. On my computer that is: C:\Program Files\Java\jdk1.6.0
    FINALLY:
    (1) Open Windows Explorer (or "My Computer")
    (2) Go to Tools -> Folder Options -> File Types
    (3) Find the CLASS extension (or create it by hitting the "New" button)
    (4) Select it and hit "Advanced"
    (5) Select "open" action and hit "Edit" or create a new action
    Action: open
    Application Used To Perform Action: C:\Program Files\Java\jdk1.6.0\javalauncher.bat "%1"
    Explanation:
    The action variable %1 returns a full path. Passing this to java
    with "java %1" doesnt work so I gave up on this a long time ago.
    Unfortunately the batch file file path manipulation trick doesnt work
    in the action window "java %~f1" so a batch file is necessary.
    Also anyone trying to condense these lines:
    cd "%~dp1" java -cp . %~n1 into this:
    java -cp "%~dp1" %~n1 ... that will NOT work
    if you are in a folder with spaces in the path.
    For some reason java doesnt recognize quoted
    paths that end in a path separator:
    java -cp "C:\a space\" Program <--- fails
    Why not a simple exe? With this method you can pop into the java
    launcher bat file and make little tweaks if you ever have to.
    Plus a SINGLE line of text is better then opening up MSVC++
    creating an entire project, compiling etc etc.
    Why not a JAR? This is just for the simple programs beginners would
    write (an intermediate step between the command line and an IDE!).
    Why else is this a good idea? Beginners learn the basics of BAT files
    and what they can do. This technique is extensible to a Compile and
    Jar Me Up! action.
    Also, you can create actions involving Java programs called from a
    bat for more complicated things. For example: right click on a .JAVA file
    and it will write the manifest file and jar up every java file in the folder.
    Also, why not. It takes 2 minutes?
    EDIT: quotes missing in the start command fixed

    until recently, I had a .bat file successfully executing one of my class files.
    Something changed, and not I get this error.
    Exception in thread "main" java.lang.NoClassDefFoundError: BatchStandaloneso my basic question is, what all would I need to have on the CLASSPATH or PATH again to have this work? I am thinking that's what got disrupted.
    Because now it doesn't work, and I seem to believe I inadvertently changed that. I may have added a jar file to my commons/lib dir in Tomcat, but that shouldn't have altered it so drastically.
    Thanks.

  • Line number in a *.class file, please help, advanced language guys

    dear all,
    i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
    1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
    s = start_pc,n = line_number
    s , n
    0 , 123
    8 , 125
    23 , 126
    29 , 127
    34 , 129
    38 , 130
    2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
    does these info exist inside a *.class file?
    thx for any light

    jdb gets line number of fields from class file, not
    source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
    First, I created and compiled class Tester:
    public class Tester
        public static void main( String[] argv )
        throws Exception
            Tester x = new Tester();
            System.out.println(x.toString());
        int     x;
        int     y;
        private Tester()
            x = 0;
            y = 1;
    }Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     x;
    17        int     y;
    main[1] quit
    Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     a;
    17        int     b;
    main[1]

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

  • How to 'deploy' an Applet when class files are on client machine?

    Hi all,
    I've searched through these forums and I can't find where my specific question has been asked before, so please accept my apologies for any duplication.
    I am trying to develop an applet for use on an intranet. (The specific requirement is that the applet must operate a scanner, and upload the scanned images to the database - we want it to be an applet so that it seamlessly integrates with the rest of the web application from the user's POV).
    Therefore the applet needs to run outside of the sandbox, but I don't want to go to all the hassle of getting a certificate from Verisign and signing the applet - that doesn't seem like it should be necessary, since there is no problem getting access to the client PC to install the class files by hand!
    I have read on this tutorial page that applets "that are loaded from the local file system (from a directory in the user's CLASSPATH) have none of the restrictions that applets loaded over the network do," so I don't think I am barking up the wrong tree:
    http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    That is exactly what I want to do! But whenever I try to run the applet, I get a no class definition found exception. However, if I run the applet as a standalone application (using its static main method) then the JRE has no trouble locating the class file - so I know that my CLASSPATH environment variable is set ok.
    Therefore I think the problem must be in my JNLP file. This is what mine looks like at present:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/JGNS008" href="http://localhost:8080/JGNS008/scanner-applet.jnlp">
        <information>
            <title>Scanner Applet Prototype</title>
            <vendor>Fooware</vendor>
        </information>
        <resources>
            <!-- Application Resources -->
            <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
            <jar href="ScannerApplet.jar" main="false" />
        </resources>
        <applet-desc
             name="Scanner Applet Prototype"
             main-class="uk.co.fooware.ScannerApplet"
             width="72"
             height="20">
         </applet-desc>
         <update check="background"/>
    </jnlp>How do I rewrite this so that it doesn't try to download the class files from the network?
    Many thanks,
    Richard.

    richardwild wrote:
    ..I am trying to develop an applet for use on an intranet. (The specific requirement is that the applet must operate a scanner, and upload the scanned images to the database - we want it to be an applet so that it seamlessly integrates with the rest of the web application from the user's POV).
    Therefore the applet needs to run outside of the sandbox, but I don't want to go to all the hassle of getting a certificate from Verisign and signing the applet - that doesn't seem like it should be necessary,.. Code can be digitally signed without a 'verified' certificate from Versign.
    ..since there is no problem getting access to the client PC to install the class files by hand!
    I have read on this tutorial page that applets "that are loaded from the local file system (from a directory in the user's CLASSPATH) have none of the restrictions that applets loaded over the network do," so I don't think I am barking up the wrong tree:
    http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    Huh. I had never heard of that, but since I do not have access to my end user's classpath it is not that important to me.
    BTW - I am guessing they mean the path indicated by [http://pscode.org/prop/all.html?prop=java.class.path].
    And putting classes into JRE folders seems very hackish to me.
    That is exactly what I want to do! But whenever I try to run the applet, I get a no class definition found exception. However, if I run the applet as a standalone application (using its static main method) then the JRE has no trouble locating the class file - so I know that my CLASSPATH environment variable is set ok.Huh?
    Therefore I think the problem must be in my JNLP file. Huh?!? Why not deploy the applet using a standard applet element? The only way to configure an applet using a JNLP is ..
    a) If the applet is intended to be free floating.
    b) If the applet is intended to be embedded in a plug-in2 architecture JRE. Why impose that restriction, when it seems unnecessary and unproductive?
    Note that the second option is very new, and I would not expect all the things mentioned in the document you linked, to apply equally to JNLP embedded applets. If you want this applet embedded, I suggest you drop the entire JNLP approach and use a standard applet element.

  • How to display the HTML File Titles instead of File Names

    Hello All,
    I want to display the HTML file titles instead of File names in the Search Results. I've tried to give this command in the 'Visible Properties' in the 'SearchResourceRenderer' as:-
    Visible Properties: rnd:displayTitle
    However this is not working for me. If anyone has an idea of what to pass here or any other alternative to display the Titles.
    Regards
    Vaib

    Summary of steps:
    1) Standard Layout Set used: SearchResultLayoutSet
    2) Create a new layout set using ADVANCED COPY
    3) Change properties as you require
    4) Next modify the search OTH file to reflect this newly created Layout Set (under KM > root > etc > oth > search.oth edit xml file property rndLaoutSet from SearchResultLayoutSet to MyCustomSearchResultLayoutSet)
    5) Check in the document to complete the editing process if Edit Locally is used!
    6) Lastly, activate the OTH file by –
    •     Setting Debugging settings via Debugging Settings
    •     Performing a normal search
    •     Clicking Rendering information and then following link OTH Overview click on Reload
    7) Reload above reloads the OTH file and performing search again will yield the desired result
    8) To turn off the Rendering Information link remove the user id from Debugging Settings.
    Cheers
    Ankit

Maybe you are looking for