0% found this document useful (0 votes)
40 views3 pages

Adding Gson Into Vscode

Adding Gson Into Vscode

Uploaded by

specsdeveloper13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
40 views3 pages

Adding Gson Into Vscode

Adding Gson Into Vscode

Uploaded by

specsdeveloper13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
Importing the GSON library jar file into my project is not producing expected results Acked 2 years, Smonths ago Modified 2 years,5 months ago Viewed Sk times Hope you're doing well. 'm creating this simple app where you write text into a TextField and it should write it within a new JSON File in the resources folder. 'm pretty sure that my code is perfectly fine upon checking it with my professors, however, upon importing the library as seen here: ‘And executing the following code when the button is pushed: *1 have the following imports at the top of my JFRame class (The IDE shows no errors under those lines) Amport con.google.eson.cs0n; Anport con_google.gson-csonbuilder; son gson = new Gsonbuilder() create); //<-- The erron always © | get the following error which I have no idea how to fh peuitachoveron comquectonle24e0rpaing eto iran teito my pjecti-nalpoduang-apedoae Be nee neaeernsromemrepars ey Manner eon enrich tae nE) | have read that switching to a Maven project is an alternative but it's not recommended for my practical. Any selutions would be greatly appreciated. | must also further note that the jar fle is located in my lbs folder and itis there. Many thanks! Edit: They asked me how my program was executed and this is what goes into the compiler in vscode (I execute it in the Run -> Run without Debugging) his question How are you running your program? Did you make su the Jar file isin the classpath there? ~ Andreas Hi @Andreas, | added what goes into the compiler, hope it helps. I'm not sure how you can if the jr files inthe classpath ~ Yago Tobio ; \Wny is switching to Maven (or any other altematve lke grade) “not recommended"? | guess anyone would suggest you to bull your project with a tool that makes things easier. - Hern Alarcon ; Please post the smallest cade snippets that can reproduce your errors. - Melly Wang-MS w le’ shoot the person down for asking a val question! ~ Droid Ch peuitachoveron comquectonle24e0rpaing eto iran teito my pjecti-nalpoduang-apedoae aa 2 Answers Sorted by: Highest score (defaut) ‘a. [download gson-2.8.6/ar from Maven Repository, after adding it to referenced libraries, the code works well 1 Please check if your jar misses some parts, Open command palette and choose Java: Clean Java Language Server Workspace then redownload the jar and see if question goes away. Sate Improve this answer Follow ected Apr 23, 2001 at 728 snawered Apt 23,2021 a 6:18 Molly Wang-MSFT Eror ail appears unfortunately | ried downloading it from the same place, have no idea what it could be. Yago Tobia. Avr 24 “a. The issue has been fixed for those stil searching. | had to install this SDK which I was missing from VSCode -> Here https//dotnet microsoft.com/download/dotnet/thank-you/sdk-5.0202-windows-x64-installer2journey=vs-code oO and just create a new project in the left hand bottom panel. Then import everything as you should and demonstrated by ~~) Molly Wang, Imnprove this answer Follow cited Apr 25, 2001 at 1949 angwered Apt 25,2021 at 1944 Dharman # Yago Tobio BH.tk #25 #87 613 aoete peuitachoveron comquectonle24e0rpaing eto iran teito my pjecti-nalpoduang-apedoae

You might also like