当我在 build.xml 中使用“manifestclasspath”时,我在 Ant 中面临上述问题。
我在 Windows 中遇到的问题是;
没有合适的相对路径 .....................
C:\Users\TOSH\Desktop\sampleserver\repository\components\plugins\XmlSchema_1.4.7.wso2v2.jar
我的build.xml如下;
<path id="jar.classpath">
<pathelement path="${class.dir}"/>
<fileset dir="${basedir}/../../../repository/components/plugins">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<mkdir dir="${class.dir}"/>
<manifestclasspath property="tem.classpath" jarfile="pathing.jar">
<classpath refid="jar.classpath"/>
</manifestclasspath>
<jar destfile="pathing.jar" basedir="target/classes">
<manifest>
<attribute name="Class-Path" value="${tem.classpath}"/>
</manifest>
</jar>
<path id="javac.classpath">
<pathelement path="${class.dir}"/>
<pathelement path="pathing.jar"/>
</path>
</target>
Run Code Online (Sandbox Code Playgroud)
有谁知道原因吗?
我的应用程序中有以下代码块;
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(FilePath);
Run Code Online (Sandbox Code Playgroud)
这里'FilePath'是文件的绝对路径.
当我在正常模式下运行应用程序时,上面的代码在linux和windows中工作正常.(即:在命令提示符下)但是当我将应用程序作为Windows服务运行时,这不起作用.我将输入流作为'null'.
有人遇到过这样的问题吗?除了java类加载器之外,我找不到任何关于此的信息.这里我们使用"ContextClassLoader",它是正确使用的类加载器.
这有什么线索吗?
我尝试使用以下命令删除现有主题(我使用kafka管理控制台检查);
#./ kafka-topics.sh --zookeeper zookeeper.xx.com:2181/chroot --delete --topic testTopic
但它说动物园管理员没有这个主题.[1]
我在运行时创建这些主题.(我使用Highlevel Client API.我认为它是在kafka集群中创建的吗?)
如何使用此bash脚本删除主题?
[1]
Error while executing topic command : Topic targettopic does not exist on ZK path zookeeper.xx.com:2181/chroot
[2016-10-14 11:58:59,919] ERROR java.lang.IllegalArgumentException: Topic streamtargettopic does not exist on ZK path zookeeper.xx.com:2181/chroot
at kafka.admin.TopicCommand$.deleteTopic(TopicCommand.scala:169)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:69)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Run Code Online (Sandbox Code Playgroud) 我在我的Mac 10.9机器上安装了eclipse火星.在日食中进行一些开发时,我经常会遇到OOM问题.当我检查eclipse.ini文件时,我看到config.ini我的configuration文件夹中的文件,它没有任何内存设置.config.ini文件是这样的;
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Mon Mar 16 14:23:27 IST 2015
org.eclipse.update.reconcile=false
eclipse.p2.profile=epp.package.jee
osgi.instance.area.default=@user.home/Documents/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.10.100.v20140716-1347.jar
equinox.use.ds=true
eclipse.buildId=4.5.0.I20140806-2000
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.0.v20131217-1203.jar@1\:start
Run Code Online (Sandbox Code Playgroud)
这是我需要编辑和设置内存设置的文件吗?还是不同的?org.eclipse.equinox.simpleconfigurator.configUrl = file:org.eclipse.equinox.simpleconfigurator/bundles.info eclipse.product = org.eclipse.platform.ide osgi.splashPath = platform:/base/plugins/org.eclipse.platform osgi.framework.extensions = reference:file:org.eclipse.osgi.compatibility.state_1.0.100.v20140702-1948.jar osgi.bundles.defaultStartLevel = 4 eclipse.application = org.eclipse.ui.ide.workbench eclipse.p2 .data.area = @ config.dir /../ P2 /