- Java debugging and language support in Visual Studio for Android
- Building Java sources
- Editing Java sources (New in Update 1, Experimental)
- Debugging Java sources (New in Update 1)
- JDK отсутствует при создании приложения на основе Xamarin в Visual Studio 2015
- Симптомы
- Причина
- Обходной путь
- Обратная связь
- Visual studio 2015 java
- Asked by:
- Question
- All replies
- Dev centers
- Learning resources
- Community
- Support
- Programs
- Visual studio 2015 java
- Answered by:
- Question
- Answers
- All replies
- JDK is missing when you create a Xamarin-based app in Visual Studio 2015
- Symptoms
- Cause
- Workaround
Java debugging and language support in Visual Studio for Android
As part of our continued efforts to make Visual Studio a productive environment for developing mobile applications we’re pleased to announce that Visual Studio 2015 Update 1 RC adds support for debugging your Java source files that are part of your Android projects and (with the help of an extension) get IntelliSense and Browsing assistance for these files in the editor. This blog post shows you how to get started with the newly added Java support as well as what to expect from the Visual Studio support in Update 1.
Building Java sources
- Create a new project starting with the Basic Application template (under C++ > Cross-Platform node under New Project Dialog)
- Start from one of the Code Gallery Android C++ samples that ship with Java source code
- Import an Eclipse Android project that already contains Java files (under File > New > Android Projects from Eclipse… menu, after installing the Java support extension)
- Place one or more .java files under your “src” subfolder of your existing project folder and then include it in your project.
Editing Java sources (New in Update 1, Experimental)
When first opening a .java file in the editor, you’ll notice a new breadcrumb notification message that encourages you to install the new Visual Studio extension for Java language support. This notification can be dismissed, but we recommend that you try out this extension and share with us your experience. Note: you need to restart Visual Studio after installing the extension for it to kick into action.
The extension will provide colorization (both syntactic and semantic), error and warning squiggles as well as code outlining and semantic highlighting in your Java files.
In addition to these, while writing code, you’ll get IntelliSense help:
- Member List will show the possible candidates for import statements, instance members, etc.
Another handy feature for larger codebases or for navigating 3 rd party libraries for which you have the source code available is Go to definition (F12) which will take you to the symbol definition location (if available).
Debugging Java sources (New in Update 1)
To turn on Java debugging for your Android projects in your next debugging session, in the Debug Target toolbar, change Debug Type dropdown to “Java Only” as in the picture below.
To make the choice persist, you can also go to a project’s properties (right click in Solution Explorer and select “Properties”) and in the Debugging tab switch Debugger Type to “Java Only”.
You can now set line breakpoints anywhere in your Java code. Not only that, but you can add conditions or hit counts for the breakpoints to be hit as well as specify breakpoint actions you want to take when the breakpoints are hit, including continuing the execution of the program (i.e. turn the breakpoint into a TracePoint).
When a breakpoint is hit, you have access to several debug windows providing you insights into the state of your application: Call stack, Watch and Locals windows, and Logcat.
Threads window aids with multi-threaded debugging by displaying the full list of threads including their names and respective call-stacks.
In the Exceptions window, you can configure which first chance exceptions you’d like the debugger to stop on. Once an exception is thrown, execution will stop to the specific location in code with a familiar First Chance Exception dialog giving you the opportunity to inspect the exception.
In addition to the watch window, you can also use the convenient DataTips to quickly view the value of a variable or pin DataTips for specific variables right inside the editor.
This summarizes the current support for Java debugging and language services in Android projects for Visual Studio 2015 Update 1. We look forward to you trying out these new features and sharing your feedback either through Send-A-Smile/Frown (use #cpp2015), Connect, User Voice or down below in the comments.
JDK отсутствует при создании приложения на основе Xamarin в Visual Studio 2015
Эта статья поможет вам решить проблему, из-за которой пакет java Development Kit (JDK) отсутствует при создании приложения Xamarin Android или Xamarin.Forms в Microsoft Visual Studio 2015.
Оригинальная версия продукта: Visual Studio 2015
Исходный номер базы знаний: 4483429
Симптомы
При создании приложения Xamarin Android или Xamarin.Forms в Visual Studio 2015 может появиться сообщение об ошибке, похожее на следующее:
Для Xamarin.Android для Visual Studio требуется пакет средств разработки Java. Установите его или задайте путь к пакету средств разработки Java в меню параметров Tools-Options-Xamarin-Android>>>.
Например, отображается диалоговое окно сообщения об ошибке, похожее на следующий снимок экрана:
Причина
Эта проблема возникает из-за того, что Oracle больше не разрешает распространение JDK в Visual Studio (с января 2019 г.).
Обходной путь
Чтобы обойти эту проблему, выполните указанные ниже действия.
- Установите последнюю версию JDK 8, доступную на веб-странице скачиваемых файлов oracle Java SE Development Kit 8.
- Следуйте инструкциям в сообщении об ошибке, чтобы вручную указать экземпляру Visual Studio расположение нового JDK.
Для оптимальной разработки мобильных приложений мы рекомендуем обновить версию Visual Studio до последней версии, чтобы следить за последними изменениями в разработке для iOS и Android.
Заявление об отказе от ответственности за сведения о продуктах сторонних производителей
В этой статье упомянуты программные продукты независимых производителей. Корпорация Майкрософт не дает никаких гарантий, подразумеваемых и прочих, относительно производительности и надежности этих продуктов.
Обратная связь
Были ли сведения на этой странице полезными?
Visual studio 2015 java
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
Hello everyone, i recently downloaded Visual Studio Community (2015) because i wanted to learn java and make a program using it. When i click new project, it doesnt show java. How can i «connect» java to visual studio community? Thanks.
All replies
But why do you want to re-install it ? The article says : «First, you need to download and install Visual Studio Community 2015 .
Then, download and install Integra Studio«
Hi Ognjennn_, Please install Java Language Support extension in visual studio community 2015. And please download related components which it supports: Best Regards, Dylan MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
Because Ognjennn_ wants to use VS for Java and you implied that VS must be re-installed.
Sam Hobbs
SimpleSamples.Info
Are you sure you must use VS 2015? VS 2019 will have better support of Java.
Sam Hobbs
SimpleSamples.Info
Dev centers
Learning resources
Community
Support
Programs
© 2023 Microsoft
Visual studio 2015 java
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I knew to run JAVA Console Application in Visual Studio 2015, But now i am searching to create a ‘JAVA web Application’ using my favourite IDE Visual studio 2015. Please guide me..
Answers
Hi Dinesh, The only extension I know is the one that we linked to you. I fear that you will not find better support at the moment. It is really uncommon to develop Java with Visual Studio and my recommendation would be to not use Visual Studio for such Java Development. I like to use Visual Studio with ReSharper for non Java Development and IntelliJ for Java projects. There are of course a lot of differences (the technology in the enterprise world is already different!) but for me it was very important to have the same key bindings without much work. (ReSharper brings the option to switch to IntelliJ keybindings.) But that is just my personal view and I don’t know if that is useful for you in any way. With kind regards, Konrad
- Proposed as answer by lake Xiao Monday, April 25, 2016 12:54 AM
- Marked as answer by lake Xiao Monday, May 2, 2016 8:38 AM
All replies
Hi Dinesh Nagrale, Thanks for you post. Maybe you could try to use this visual studio plugin to support the java language: Reference: https://visualstudiogallery.msdn.microsoft.com/bc561769-36ff-4a40-9504-e266e8706f93 Best Regards, Lake Xiao
JDK is missing when you create a Xamarin-based app in Visual Studio 2015
This article helps you work around a problem where Java Development Kit (JDK) is missing when you create a Xamarin Android or Xamarin.Forms app in Microsoft Visual Studio 2015.
Original product version: Visual Studio 2015
Original KB number: 4483429
Symptoms
When you create a Xamarin Android or Xamarin.Forms app in Visual Studio 2015, you may receive an error message that resembles the following error:
Xamarin.Android for Visual Studio requires Java Development Kit. Please install it or set Java Development Kit path on Tools->Options->Xamarin->Android Settings menu.
For example, you see an error message dialog box that’s similar to the following screenshot:
Cause
This issue occurs because Oracle no longer allows distribution of JDK in Visual Studio (as of January 2019).
Workaround
To work around this issue, follow these steps:
- Install the latest JDK 8 that’s available from the Oracle Java SE Development Kit 8 Downloads webpage.
- Follow the instructions in the error message to manually point your Visual Studio instance to the location of your new JDK.
For the best mobile development experience, we encourage you to update to the latest Visual Studio version to keep up with the latest changes in iOS and Android development.
Third-party information disclaimer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.