[英]Sending an object from android to java using sockets (Hibernate class)
I have created a class in java and connect it to MySql using hibernate
, to send the class via sockets
it should implements Serializable
and give it a serialversionuid
. 我在java中创建了一个类,并使用
hibernate
将它连接到MySql,通过sockets
发送它应该实现Serializable
并给它一个serialversionuid
。 Also to make it works I export the class as .jar
file and included in both android an java projects . 为了使它工作,我将类导出为
.jar
文件,并包含在android和Java项目中。
The question here , since my class created in java call the hibernate Api such @ColumnName("Bla")
, how should I make it work on android , since android project not included the hibernate library ? 这里的问题,因为我在java中创建的类调用了hibernate Api这样的
@ColumnName("Bla")
,我应该如何让它在android上运行,因为android项目不包含hibernate库?
我发现即使没有在你的android中包含hibernate你也可以使用该类,也许原因是因为它是一个.jar文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.