当前位置:
代码迷
>>
J2SE
>> 怎么修改.class文件,只要修改几个字啊不要太麻烦
详细解决方案
怎么修改.class文件,只要修改几个字啊不要太麻烦
热度:
26
发布时间:
2016-04-24 00:25:11.0
如何修改.class文件,只要修改几个字啊,不要太麻烦
我把几个常用的jar合并到了一起,但是发现自己写那个jar包含了BaseDao,所以我想在别的项目修改BaseDao里面的连接字符串,求高手给一个简单的方法!!
------解决方案--------------------
两招:
1、如果是成员属性的话,用反射来修改连接字符串这个变量值;
2、如果类比较简单,先用反编译得到class的java源码,然后修改完再编译为class替换jar包中的。
------解决方案--------------------
探讨
引用:
两招:
1、如果是成员属性的话,用反射来修改连接字符串这个变量值;
2、如果类比较简单,先用反编译得到class的java源码,然后修改完再编译为class替换jar包中的。
能给个具体的实现过程吗?
相关解决方案
Class not found: com.mchange.v2.c3p0.ComboPooledDataSource,该怎么处理
org.apache.jasper.JasperException: Unable to compile class for JSP:该怎么解决
org.apache.jasper.JasperException: Unable to compile class for JSP:解决思路
!使用JDNI时,报 Cannot create JDBC driver of class '' for connect URL 'null'
Unable to load class for JSP,该如何处理
新手Dialect class not found
Caused by: org.hibernate.MappingException: Association references un地图ped class: com.elone.pm.product.dao.TAttribute
Error creating bean with name 'sessionFactory' defined in class path resource解决方法
Unable to compile class for JSP找不出异常
Could not load JDBC driver class 咋回事
No setter found for property 'sessionFactoroy' in class 'com.iBBS.dao.impl.UserI解决思路
getHibernateTemplate().get(entity.Class,serializabel id) 如何报java.lang.NullPointerException的错误
小弟我在tomcat里的Server.xml部署web项目报Error instantiating servlet class
Jsp + Oracle 怎么取回id,报错getInt not implemented for class oracle.jdbc.driver.T4CRo
ssh项目hibernate 异常:org.hibernate.MappingException: Association references unmapped class: Message
java.lang.NoClassDefFoundError: Could not initialize class cn.elvis.utils.JdbcUt,该如何处理
Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'解决方法
class path resource [applicationContext.xml] does not exist解决方法
ids for this class must be manually assigned before calling save(): po.Project解决方法
class not found error,该如何处理
初学急求(待高手指导)java.lang.InstantiationException: Class not a MIDlet?已经写了MIDlet类,如何修改
用eclipse打包jar后运行,弹出异常could not find main class
eclipse class not found 愁死了解决方法
cannot resolve symbol: class ApplicationException 有关问题
javamail . class javax.mail.AuthenticationFailedException解决办法
class.formName获取的种能做List的泛型类么
myeclipse控制台程序运行报错:could not find the main class:org.apache.log4j.net.JMSSink.解决办法
myeclipse控制台程序运作报错:could not find the main class:org.apache.log4j.net.JMSSink
Class.forName 失误