HJED
HJED

Reputation: 1107

Run netbeans as pure java (without exe)

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

Upvotes: 0

Views: 760

Answers (2)

user330315
user330315

Reputation:

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..

Upvotes: 2

Jayan
Jayan

Reputation: 18459

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.

Upvotes: 1

Related Questions