I can't install Netbeans10 - java

As a beginner for java,I found it's easy to install Netbeans8 but not Netbeans10.It seemed that I need to deal with the documents I downloaded.Here are the instuctions from the website of Netbeans but I don't understand why I can't install it.Please help me know how to deal with it.
To build Apache NetBeans (incubating) 10.0 from source you need:
Oracle’s Java 8 or Open JDK v8.
Apache Ant 1.10 or greater (https://ant.apache.org).
Once you have everything installed then:
Unzip incubating-netbeans-10.0-source.zip in a directory of your liking.
cd to that directory, and then run ant to build the Apache NetBeans IDE. Once built you can run the IDE by typing ./nbbuild/netbeans/bin/netbeans

Just download the bin folder from here and place it where you want your Netbeans installation to be.
Go to the bin folder and execute the IDE (NetBeans or netbeans64.exe which is depending on your system).
If you having trouble and NetBeans says it can't find your java SDK head to the etc folder and open the config file (netbeans.conf).
There you find a line that looks like this: #netbeans_jdkhome="/path/to/jdk"
Change that line to the path where your Java SDK is installed and DONT forget to remove the hashtag because then its referenced as a comment.
At the end it should like something like this: netbeans_jdkhome="C:/Programm Files/Java/jdk.x.x.x"
I Hope I could help you

Related

JAVA SE 8, JDK-8u151.exe installation doesn't include src.zip file [duplicate]

I installed the JDK8u40, but only find the javafx-src.zip.
Where can I find the source code for JDK? The src.zip?
Below is what I get after installation:
And btw, I didn't see the installation wizard! This is quite strange.
ADD 1
Today I tried several Java installation packages. All are downloaded from Oracle official site.
jdk-6u45-windows-i586.exe
jdk-7u75-windows-i586.exe
jdk-8u20-windows-i586.exe
jdk-8u25-windows-i586.exe
jdk-8u31-windows-i586.exe
jdk-8u40-windows-i586.exe
Both 6u45 and 7u75 installed well on my box. I can see the install wizard. And the src.zip is installed.
But 8u25 ~ 8u40 all installed silently. And no src.zip file is installed because I have no chance to select it in the wizard.
I am not sure if this is my fault or someone at Oracle made a mistake.
As #SubOptimal commented, the /s option indicates a silent install. I am wondering if there's an option to force the GUI install wizard to open.
I am using Windows 7 Enterprise x64 Build 7601 SP1
Make sure the Source code is not disabled when downloading.
Then as you can see on the picture, selecting "Source Code" will tell you exactly where it is located.
Notice that I've downloaded the 32 bits version to make sure to reproduce the same use case as you.
Edit
As per your new edits and comments, it seems what you want to know now is why you don't see the installation wizards. I'm pretty sure this is due to old-set registry key.
Run the following command
reg query hklm\software\microsoft\windows\currentversion\installer\UserData\S-1-5-18\Products /f "java" /s | find "HKEY_LOCAL_MACHINE"
Now, navigate to each of the returned path browsing with regedit and delete their entire parent (the big hexa number).
Re-try the installation and I'm pretty sure you will see the wizard.
As for the sources, Oracle documentation specify how to download them in silent mode.
jdk.exe /s ADDLOCAL="SourceFeature"
This is the way I got the src folder from jdk-8u172-windows-x64.exe file without installing.
Step1: Download jdk-8u172-windows-x64.exe file (Java SE Development Kit 8u172) from oracle site
Step2: Extract it and navigate to the path:
\jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9
Step3: Right click on file named "110" and extract it.
You will get the src.zip file.
It took me little while to figure this out. I hope it will help others.
Enjoy debugging Good Code!
I don't know why/where the src.zip is, but as an alternative, if all you want is the source and somehow the proposed method doesn't work for you, you could always pull directly from the JDK8u40 source tree.
You will need Mercurial instead of Git. This link talks about the hg clone command
Quoting from the OpenJDK Java.net site
The corresponding master forest jdk8u can be cloned using this command: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cd jdk8u;sh get_source.sh .
In addition, the source code for the last release, 8u40, is available by cloning the 8u40 master forest : http://hg.openjdk.java.net/jdk8u/jdk8u40. The final build of that release was tagged as jdk8u40-b25.
There are differences between OpenJDK and Oracle's, though subtle
download JDK 8 from following link
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html
src.zip comes in-built with it
if you JDK installer silently skips installing the source. just open the control panel > programs an features and find Java. Right click on it and select change and then select the
source (option) ;)
Download the JDK
Run the Installer, but stop right away
Extract src.zip from C:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab
You can extract .zip from .cab with tool like 7Zip
Taken from

Unable to run executable jar file using double click

I was having jdk_1.6 in my machine and I removed it and installed jdk_1.7. So after installing jdk_1.7 I am not able to run my jar file with double click. I could run the same file using command prompt.
After installing jdk_1.7 I run the program from eclipse using java 7 and I exported jar using the same.
I am using following command for running jar:
>>java -jar csv_generator_1.jar
And this works fine and jar get executed.
But when I right click and open with javaw.exe in jad/bin folder or jdk/jre/bin/ folder it's not working.
I found same question here link1 and link2, but I am not understating what to do.
Can someone help me to resolve this?
Go there and download newest verson of java RE and install it and it should work. But if it does not work you should get some kind of error message and try to google it. It is possible that your java(s) are broken.
If you install JDK, you may think it contains JRE but it's private. At least that was stated during installation process. Therefore, you had to install Public JRE.
JDK installer provides an option to do so but if you didn't check it, you might experience the problem you described.

GGTS The project was not built since its build path is incomplete

I am having problem running my grails application from grails GGTS IDE.
I had to format my harddisk so i had to reinstall all new software. I had a copy of Groovy/Grails Tool Suite. I didn't need to install it since it was stand alone so i just ran it. Since i didn't have java installed i installed jdk 1.8. so now in the path C:\Program Files (x86)\Java i could see both jdk1.8.0_65 folder and jre1.8.0_65 folder.
Now i imported a git project by doing git clone from ggts. Now the final thing i did was that i went to window > Preferences. There in Java > Installed JREs in the right side i clicked on Add.. chose standard VM and and clicked on Directory ... for JRE home and then located the jdk location. c:\program files(x86)\java\jdk1.8.0_65.
After following these steps i get the following error message.
"The project was not built since its build path is incomplete. Cannot find the class file for groovy.lang.GroovyObject. Fix the build path then try building this project"
am i missing any other configurations? if so, please let me know. I appreciate your help!
Note: One thing i am noting is that when i go to properties of the project and select java build path and select libraries and there is JRE System Library [jdk1.8.0_65]. I expand it and there in Native library location i notice it has (None). Does this have anything to do with the errors i am getting?
Did you try to right-click on project and "Grails Tool -> Refresh Dependencies"?
It's also possible to execute it from command line (confirmed on Ubuntu):
grails compile --non-interactive --refresh-dependencies

Executing Eclipse plugin (jdt/ast) outside eclipse IDE environment

Can I execute Eclipse Java development tools as a standalone process? I need to get Java program's AST structure using Eclipse JDT from another program, and to do that, I need to execute eclipse plugin as a stand-alone process behind the scene.
Is that possible? If so, how one can do that?
Eclipse/jdt and eclipse/ast is nothing more than a jar file, so one can use them to build standalone java application.
Example
I googled to find ASTExplorer as an example to make eclipse/ast plugin as a standalone java project.
The program was targeted for pretty old eclipse (3.0.2), I downloaded the 3.0.2 for Mac OS X this site - http://archive.eclipse.org/eclipse/downloads/drops/R-3.0.2-200503110845/
You need to setup ECLIPSE_HOME classpath variables in Preference -> Java -> Classpath variables
The .classpath has those classpath variables already, you can refer to this post - .classpath contents update in eclipse. As you can see it refers eclipse/jdt(art) jar files. I'm pretty sure one can change the reference to the newest version of jdt/ast without downloading the 3.0.2 version.
As I use Mac, I need to replace the swt for PC with swt for Mac. I could do that in BuildPath/Configure Build path
First remove the PC swt reference.
Then add the correct Mac swt reference.
Compile the example with the eclipse indigo/on mac
When the setup is correct, eclipse starts building the project. You can use Project -> Build Project menu. Then, you can check the application works fine in eclipse.
Generate the executable jar
Export to executable jar file.
You'll get some warnings, but you'll have a jar file.
Execute the generated jar
Just executing java -jar ast.jar doesn't work on Mac, I got a hint from this post.
Running SWT based, cross-platform jar properly on a Mac
In short, you need to run java -XstartOnFirstThread -jar ast.jar
Does it have to be Eclipses's AST? Or is any AST generation o.k.? If it doesn't have to be eclipse, I'd suggest Habelitz open source Java AST Compiler. http://www.habelitz.com/ I'm using it myself for some projects....
Well, of course you can launch eclipse just like any other process : How to create a process in Java
And then the problem becomes relaying the information back to the original process, which gets kind of messy. My suggested approach in this case would probably be to create a plugin in eclipse and have that plugin do whatever it is you think you need the AST for. You can work out messages with command line options to eclipse, or a shared file or something.

How can I add Java Template Project in Xcode 4?

I wanna know how can I add Java Template Project in Xcode 4.
I'm working with Eclipse and it's really fine but i want to write Java program in Xcode.
Thanks for helping. ;)
Java is not a first class citizen of Xcode anymore, so you should in my opinion stay with Eclipse.
I realise this question is 6 years old, but I have a similar problem and found what seems an easy solution. I have an old Java project (2008-9) which I maintain but has been dormant. As I prefer to keep it into Xcode I transferred the whole project (sources, project files and all paraphernalia) to a new development machine running el Capitan with Xcode 7.3.1. I opened the project (which was still in 3.1 version) with it, and tried to build it. It failed as Ant was missing. So I downloaded Ant (version 1.10.1) and copied its bin and lib directories under /usr/local/ant, then I changed the project external build tool configuration (under project, go to Info, and you'll see that parameter) which was set to /usr/bin/ant and set it to /usr/local/ant/bin/ant or wherever you put it. Build again and this time it worked.

Categories

Resources