Results 1 to 8 of 8
- 10-11-2010, 04:20 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 3
- Rep Power
- 0
how to manipulate a .class file without complex compiling
Guys, I desperately need help here. I am not familiar with Java at all. I am trying to customize a web interface of an IP-PBX application. There is a .class file that I need to modify to proceed with the customization but I have no idea how to do it. I only need to modify a line in the file and I will upload it back into its original location. Is there a .class file editor out there for people like me.
I am sorry if I did not provide enough information to explain my problem. I can provide more if necessary.
-
The best way is to get the Java source file(s), modify it and then compile. If you don't have the Java source, ask for it. If you don't have rights to it, you shouldn't be modifying it.
Much luck and welcome to the java-forums.org.
- 10-11-2010, 04:35 AM #3
Member
- Join Date
- Oct 2010
- Posts
- 3
- Rep Power
- 0
thanks, I have the source file. (it is an open source product by the way)
but thats all I have. I mean I can extract the jar files from the software but I will most likely get lost once I start getting into that much detail.
Is there a way to do the compilation using only the source file? when I use javac, it gives all sorts of error messages. Is there a way to disregard those and just create the .class anyway?
ThanksLast edited by eksantrik2; 10-11-2010 at 05:02 AM.
- 10-11-2010, 07:09 AM #4
Not helpful. Copy and paste the error messages verbatim -- no paraphrasing -- and someone may be able to help. No guarantees though.when I use javac, it gives all sorts of error messages.
Are you aware that all dependencies must be available on the classpath both at compile time and run time?
db
- 10-11-2010, 10:30 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,452
- Rep Power
- 16
If you're going to alter the code then I suggest checking out the project properly from their source control, otherwise you'll almost certainly spend a while trying to handle dependencies.
- 10-11-2010, 07:37 PM #6
Member
- Join Date
- Oct 2010
- Posts
- 3
- Rep Power
- 0
The .class file I am trying to edit is called SkinControl. The following is what I am getting when I try to compile it.
C:\Documents and Settings\Administrator\Desktop>javac SkinControl.java
SkinControl.java:10: package org.apache.tapestry does not exist
import org.apache.tapestry.IAsset;
^
SkinControl.java:11: package org.apache.tapestry.asset does not exist
import org.apache.tapestry.asset.AssetFactory;
^
SkinControl.java:12: package org.sipfoundry.sipxconfig.components does not exist
import org.sipfoundry.sipxconfig.components.HivemindConte xt;
^
SkinControl.java:13: package org.sipfoundry.sipxconfig.components does not exist
import org.sipfoundry.sipxconfig.components.TapestryConte xt;
^
SkinControl.java:14: package org.springframework.beans.factory does not exist
import org.springframework.beans.factory.BeanFactory;
^
SkinControl.java:15: package org.springframework.beans.factory does not exist
import org.springframework.beans.factory.BeanFactoryAware ;
^
SkinControl.java:16: package org.springframework.context does not exist
import org.springframework.context.MessageSource;
^
SkinControl.java:17: package org.springframework.context does not exist
import org.springframework.context.NoSuchMessageException ;
^
SkinControl.java:20: cannot find symbol
symbol: class BeanFactoryAware
implements BeanFactoryAware
^
SkinControl.java:54: cannot find symbol
symbol : class IAsset
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
public IAsset[] getStylesheetAssets(String s)
^
SkinControl.java:75: cannot find symbol
symbol : class AssetFactory
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
private AssetFactory getAssetFactory()
^
SkinControl.java:90: cannot find symbol
symbol : class IAsset
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
public IAsset getAsset(String s)
^
SkinControl.java:99: cannot find symbol
symbol : class TapestryContext
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
public void setTapestryContext(TapestryContext tapestrycontext)
^
SkinControl.java:125: cannot find symbol
symbol : class BeanFactory
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
public void setBeanFactory(BeanFactory beanfactory)
^
SkinControl.java:138: cannot find symbol
symbol : class TapestryContext
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
private TapestryContext m_tapestryContext;
^
SkinControl.java:141: cannot find symbol
symbol : class MessageSource
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
private MessageSource m_messageSource;
^
SkinControl.java:142: cannot find symbol
symbol : class BeanFactory
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
private BeanFactory m_beanFactory;
^
SkinControl.java:72: cannot find symbol
symbol : class IAsset
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
return (IAsset[])arraylist.toArray(new IAsset[arraylist.size()]);
^
SkinControl.java:72: cannot find symbol
symbol : class IAsset
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
return (IAsset[])arraylist.toArray(new IAsset[arraylist.size()]);
^
SkinControl.java:114: cannot find symbol
symbol : class MessageSource
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
m_messageSource = (MessageSource)m_beanFactory.getBean(m_messageSour
ceBeanId);
^
SkinControl.java:119: cannot find symbol
symbol : class NoSuchMessageException
location: class org.sipfoundry.sipxconfig.site.skin.SkinControl
catch(NoSuchMessageException nosuchmessageexception)
^
Note: SkinControl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
21 errors
**********************************************
I can definitely download all the proper files from the IP-PBX (jars etc) if it will help me to fix this.
Thanks
- 10-11-2010, 11:38 PM #7
Member
- Join Date
- May 2010
- Posts
- 27
- Rep Power
- 0
That's easy. The author used some imports that your going to have to obtain. Look up the Apache Tapestry project. Then add the .jar file that you can download from the Tapestry project's website.
- 10-12-2010, 08:34 AM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,452
- Rep Power
- 16
Similar Threads
-
can't write my jdbc class to manipulate mysql
By dilanka007 in forum New To JavaReplies: 2Last Post: 01-03-2010, 10:10 PM -
compiling .java into .class
By khp in forum Advanced JavaReplies: 4Last Post: 06-29-2009, 02:52 PM -
not compiling a copy of class -
By itaipee in forum EclipseReplies: 0Last Post: 01-07-2009, 09:47 AM -
Compiling a single class
By ROSOBORONEXPORTCORP in forum New To JavaReplies: 2Last Post: 01-28-2008, 12:27 PM -
Compiling a class in a package from cmd
By Java Tip in forum Java TipReplies: 0Last Post: 12-17-2007, 10:27 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks