0

Hi I need to run netbeans as pure java or java with a .bat launcher that means no exe launcher. Is there any pre-written script to do this and if not is there any documentation on what arguments and classpath netbeans requires.

So far I have this:

java -Djdk.home="C:\Program Files\java\default-java" -Djava.library.path="\usr\lib\jni" -classpath "C:\Program Files\netbeans\platform13\lib\boot.jar:C:\Program Files\netbeans\platform13\lib\*:C:\Program Files\netbeans\platform13\core\*:C:\Program Files\netbeans\platform13\modules\*:C:\Program Files\netbeans\platform13\modules\ext\*:C:\Program Files\netbeans\ide14\modules\*:C:\Program Files\netbeans\java5\modules\*:C:\Program Files\netbeans\apisupport3\modules\*:C:\Program Files\netbeans\7.0.1\nb\modules\*:C:\Program Files\netbeans\*\*:C:\Program Files\netbeans\*\*\*" -Dnetbeans.system_http_proxy="$http_proxy_tmp" -Dnetbeans.system_http_non_proxy_hosts="$http_non_proxy_hosts -XX:"+HeapDumpOnOutOfMemoryError"  -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Dnetbeans.home="C:\Program Files\netbeans\platform13\" org.netbeans.Main --userdir c:\Users\HJED\AppData\netbeans\7.1\ --branding nb 

however when I run it, it exits instantly with no errors.

Thanks in advance, HJED

2
  • If you are lucky netbeans on linux/solaris will use scripts to launch. Try there.
    – Jayan
    Commented Feb 14, 2012 at 10:39
  • that where I got what I've done so far, however I am not very familiar with linux scripting and the launcher consists of two reasonably complex files some of which I don't understand.
    – HJED
    Commented Feb 14, 2012 at 10:44

2 Answers 2

2

Is there any pre-written script to do this

Yes there is. It's part of your NetBeans installation

Check out the shell script netbeans in the bin directory of your installation.

That will show you what needs to be done.

Edit:

Another option might be to look at the Ant script that NetBeans uses to start a NetBeans (platform) application. As the IDE is also a NetBeans platform application it might actually give you some hints.

The Ant script is located in harness\run.xml

It doesn't look easer than the Linux shell script though..

3
  • The shell script is only in the linux installations and I don't have enough experience with linux scripting to convert it to .bat syntax, I have based what I have so far on that script, but I don't understand it well enough to go any further using it.
    – HJED
    Commented Feb 14, 2012 at 11:28
  • It is present in a windows installation when using the ZIP distribution (and not the installer)
    – user330315
    Commented Feb 14, 2012 at 11:44
  • Yeah, but the script is a linux script it is not written for windows and as I've said I've already read through it and got as much out of it as I can.
    – HJED
    Commented Feb 14, 2012 at 20:01
1

Start netbeans using exe Use jvisualvm to see java arguments( classpath, properties ) Create script from it.

jvisualvm is part of JDK. You may already have it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.