小编Hig*_*ce2的帖子

MSB3073'命令'退出代码9009

每当我执行此命令时,它会抛出错误MSB3073,代码为9009

$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)
Run Code Online (Sandbox Code Playgroud)

整个构建文件在这里:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <WebSiteSource>..\DatoCheckerMvc\</WebSiteSource>
        <SetupF>..\Setup\</SetupF>
        <PublishF>publish\</PublishF>
        <Publish>$(SetupF)$(PublishF)</Publish>
        <WebSiteContentCode>WebSiteContent.wxs</WebSiteContentCode>
    </PropertyGroup>

    <!-- Defining group of temporary files which is the content of the web site. -->
    <ItemGroup>
        <WebSiteContent Include="$(WebSiteContentCode)" />
    </ItemGroup>

    <!-- The list of WIX input files -->
    <ItemGroup>
        <WixCode Include="Product.wxs" />
        <WixCode Include="$(WebSiteContentCode)" />
    </ItemGroup>

    <Target Name="Build">
        <!-- Compile whole solution in release mode -->
        <MSBuild
            Projects="..\DatoCheckerMvc.sln"
            Targets="ReBuild"
            Properties="Configuration=Release" …
Run Code Online (Sandbox Code Playgroud)

msbuild wix command-prompt

13
推荐指数
2
解决办法
5万
查看次数

IOException at java.io.File.createNewFile();

我确实有一些无法序列化的代码。我试图在if语句中插入CanRead()和CanWrite(),这表明它们没有读写权限。我也尝试将'java.io.File.setReadable'和'java.io.File.setWriteable'插入为true,但仍然会引发错误。

代码如下:

public static void save(Object obj, String filename) throws FileNotFoundException, IOException
{
    File f = new File("c:/DatoChecker/" + filename);
    File dir = new File("c:/DatoChecker");
    if(!dir.exists())
        dir.mkdirs();
    f.setReadable(true);
    f.setWritable(true);
    if(!f.exists())
    {
        f.createNewFile();
    }
    FileOutputStream op = null;
    ObjectOutputStream objectStream = null;
    op = new FileOutputStream(f);
    objectStream = new ObjectOutputStream(op);
    objectStream.writeObject(obj);
    objectStream.close();
}

public static Object fetch(String filename) throws FileNotFoundException, IOException, ClassNotFoundException
{
    File f = new File("c:/DatoChecker" + filename);
    File dir = new File("c:/DatoChecker");
    if(!dir.exists())
        dir.mkdirs();
    f.setReadable(true);
    f.setWritable(true);
    if(!f.exists())
    { …
Run Code Online (Sandbox Code Playgroud)

java serialization filestream ioexception

2
推荐指数
1
解决办法
9713
查看次数

Java布尔if语句搞砸了

我有这个if语句,当我用JOptionPane.showMessageDialog检查时(如代码顶部所示)返回false,但块仍然执行.我看不出我应该做些什么不同.

变量:

  • c = GregorianCalendar
  • s =字符串
  • h = HashMap-array - 字符串,日期
  • oldGoods1,2和3 = HashMaps - String,Date

码:

JOptionPane.showMessageDialog(null, c.after((Date) h[counter].get(s)));
if(c.after((Date) h[counter].get(s))); //this line
{
  Calendar today = Calendar.getInstance();
  if(today.after((Date) h[counter].get(s)))
  {
    GoodsList.removeDate(s, (Date) h[counter].get(s));
  }
  if(!oldGoods1.containsKey(s)) 
  {
    oldGoods1.put(s, (Date) h[counter].get(s));
  }
  else if(!oldGoods2.containsKey(s))
  {
    oldGoods2.put(s, (Date) h[counter].get(s));
  }
  else if(!oldGoods3.containsKey(s))
  {
    oldGoods3.put(s, (Date) h[counter].get(s));
  }
}
Run Code Online (Sandbox Code Playgroud)

先谢谢Highace2

java calendar if-statement boolean hashmap

0
推荐指数
1
解决办法
150
查看次数