tunnelvisionlabs / LangSvcV2

"Language Service V2" reference repository
Other
86 stars 38 forks source link

jar exited with code 1 #12

Closed novvere closed 9 years ago

novvere commented 9 years ago

After installing the Java extension in vs2013 I created a simple java console application.

When I try to run the application I get the following error:

------ Build started: Project: ConsoleApplication1, Configuration: Debug Any CPU ------ E:\Program Files (x86)\Java\jdk1.6.0_39\bin\javac.exe -verbose -g -d obj/Debug/ -Xlint -deprecation src/main/java/pkg/Program.java E:\Program Files (x86)\Java\jdk1.6.0_39\bin\jar.exe cf obj/Debug/ConsoleApplication1.jar -C obj/Debug/ pkg/Program.clas E:\Users\mromani\Documents\Visual Studio 2013\Projects\ConsoleApplication1\packages\Tvl.Java.1.0.0-alpha001\build\Tvl.Jvm.Common.targets(2334,5): error MSB6006: "jar.exe" exited with code 1. Done building project "ConsoleApplication1.javaproj" -- FAILED.

========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

There are also a lot of warnings about un recogniced elements in Tvl.Jvm.Comon.targets lik the foloowing:

Warning 96 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'ResGenDependsOn' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRule.... e:\users\mromani\documents\visual studio 2013\Projects\ConsoleApplication1\packages\Tvl.Java.1.0.0-alpha001\build\Tvl.Jvm.Common.targets 1862 6 Miscellaneous Files

It seems the class file in the jar command line is missing an 's' it looks like .clas when it should be .class

Miguel

sharwell commented 9 years ago

Hi Miguel,

I'm sorry to hear about this affecting users. :frowning: This was fixed recently in 948ffd323c71b6bbf0535e26aa57956ff75cd534, but I don't know when I'll be getting around to another release yet. In the meantime, if you point the extension towards a JDK 7 or JDK 8 compiler, it will start working for you.

Thanks, Sam

rizasif commented 9 years ago

Hello, I am having a similar issue though I am using Java 7.

The simple "Hello World" program fails to build unless I declare my project as "StartUp Project" by right clicking on it.

After that the console window shows some Java usage things and the debug window gives "The program has excited with code 0". Some of the errors in the debug window I found were:


... A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader$1.run A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader.findClass A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.lang.ClassLoader.loadClass 'java.exe' (Java): Loaded 'java.util.ResourceBundle$Control$1' 'java.exe' (Java): Loaded 'sun.misc.Launcher$BootClassPathHolder' 'java.exe' (Java): Loaded 'sun.misc.Launcher$BootClassPathHolder$1' 'java.exe' (Java): Loaded 'java.io.IOException' 'java.exe' (Java): Loaded 'java.io.FileNotFoundException' A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath$JarLoader.getJarFile A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath$JarLoader.ensureOpen A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath.getLoader A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath$JarLoader.getJarFile A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath$JarLoader.ensureOpen A first chance exception of type 'java.io.FileNotFoundException' occurred in sun.misc.URLClassPath.getLoader 'java.exe' (Java): Loaded 'java.net.URLClassLoader$2' A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader$1.run A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader.findClass A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.lang.ClassLoader.loadClass A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader$1.run A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.net.URLClassLoader.findClass A first chance exception of type 'java.lang.ClassNotFoundException' occurred in java.lang.ClassLoader.loadClass 'java.exe' (Java): Loaded 'java.text.Format' 'java.exe' (Java): Loaded 'java.text.MessageFormat' 'java.exe' (Java): Loaded 'java.util.Locale$Category' 'java.exe' (Java): Loaded 'java.util.Locale$1' 'java.exe' (Java): Loaded 'java.text.FieldPosition' 'java.exe' (Java): Loaded 'java.text.AttributedCharacterIterator$Attribute' 'java.exe' (Java): Loaded 'java.text.Format$Field' 'java.exe' (Java): Loaded 'java.text.MessageFormat$Field' 'java.exe' (Java): Loaded 'java.lang.Integer$IntegerCache' 'java.exe' (Java): Loaded 'java.text.NumberFormat' 'java.exe' (Java): Loaded 'sun.util.LocaleServiceProviderPool' 'java.exe' (Java): Loaded 'sun.util.locale.LocaleExtensions' 'java.exe' (Java): Loaded 'java.lang.Character$CharacterCache' 'java.exe' (Java): Loaded 'sun.util.locale.Extension' 'java.exe' (Java): Loaded 'sun.util.locale.UnicodeLocaleExtension' 'java.exe' (Java): Loaded 'java.util.Collections$SingletonMap' 'java.exe' (Java): Loaded 'java.util.LinkedHashSet' 'java.exe' (Java): Loaded 'sun.util.LocaleServiceProviderPool$1' 'java.exe' (Java): Loaded 'java.util.ServiceLoader' 'java.exe' (Java): Loaded 'java.util.ServiceLoader$LazyIterator' 'java.exe' (Java): Loaded 'java.util.ServiceLoader$1' 'java.exe' (Java): Loaded 'java.util.LinkedHashMap$LinkedHashIterator' 'java.exe' (Java): Loaded 'java.util.LinkedHashMap$EntryIterator' 'java.exe' (Java): Loaded 'sun.misc.URLClassPath$2' 'java.exe' (Java): Loaded 'java.lang.ClassLoader$2' 'java.exe' (Java): Loaded 'sun.misc.URLClassPath$1' 'java.exe' (Java): Loaded 'java.net.URLClassLoader$3' 'java.exe' (Java): Loaded 'sun.misc.CompoundEnumeration' 'java.exe' (Java): Loaded 'java.net.URLClassLoader$3$1' 'java.exe' (Java): Loaded 'sun.util.resources.LocaleData' 'java.exe' (Java): Loaded 'sun.util.resources.LocaleData$1' 'java.exe' (Java): Loaded 'sun.util.resources.LocaleData$LocaleDataResourceBundleControl' 'java.exe' (Java): Loaded 'sun.util.LocaleDataMetaInfo' 'java.exe' (Java): Loaded 'java.util.ArrayList$Itr' 'java.exe' (Java): Loaded 'sun.text.resources.FormatData' 'java.exe' (Java): Loaded 'sun.text.resources.FormatData_en' 'java.exe' (Java): Loaded 'sun.text.resources.FormatData_en_US' 'java.exe' (Java): Loaded 'java.text.DecimalFormatSymbols' 'java.exe' (Java): Loaded 'java.util.Currency' 'java.exe' (Java): Loaded 'java.util.Currency$1' 'java.exe' (Java): Loaded 'java.io.DataInput' 'java.exe' (Java): Loaded 'java.io.DataInputStream' 'java.exe' (Java): Loaded 'sun.util.resources.OpenListResourceBundle' 'java.exe' (Java): Loaded 'sun.util.resources.LocaleNamesBundle' 'java.exe' (Java): Loaded 'sun.util.resources.CurrencyNames' 'java.exe' (Java): Loaded 'sun.util.resources.CurrencyNames_en_US' 'java.exe' (Java): Loaded 'java.text.DecimalFormat' 'java.exe' (Java): Loaded 'java.text.DigitList' 'java.exe' (Java): Loaded 'java.math.RoundingMode' 'java.exe' (Java): Loaded 'java.text.Format$FieldDelegate' 'java.exe' (Java): Loaded 'java.text.FieldPosition$Delegate' 'java.exe' (Java): Loaded 'java.text.NumberFormat$Field' The thread 'main' (0x1) has exited with code 0 (0x0). 'java.exe' (Java): Loaded 'java.lang.Shutdown' 'java.exe' (Java): Loaded 'java.lang.Shutdown$Lock' The thread 'DestroyJavaVM' (0xb) has exited with code 0 (0x0). The program '[6316] java.exe' has exited with code 0 (0x0).


This is what the console window shows image

Kindly help me through this. Thank you