Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Taking Java (and Netbeans) To Go (http://www.velocityreviews.com/forums/t147882-taking-java-and-netbeans-to-go.html)

Bushido Hacks 11-18-2005 07:48 PM

Taking Java (and Netbeans) To Go
 
I have mobilized Netbeans 5.0 beta 2 to a removable device. I have
step by step instructions available on my website for you to try out.

http://www.bushidohacks.com/2005/11/...java-to-go.php

Happy hacking!


Shrike 12-07-2005 01:21 AM

Re: Taking Java (and Netbeans) To Go
 
awesome. i have now mobilized netbeans (i used to use old v3.6) onto
an external hard drive, and it works great, except for one caveat: the
drive name. wen netbeans opens under a different drive name than is in
its reference files, it either won't run (netbeans.conf), or won't
compile (build.properites in the .netbeans\\5.0beta2 directory defined
by netbeans.conf). i suggest a java program to switch out the drive
names in the files.

here's the source i came up with (sry if its long):


// Mobilizer.java written by Rob Wiesler, shrike.exe@gmail.com

import java.io.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;

public class Mobilizer extends JFrame
{
public static void main(String[] args) {
new Mobilizer().show();
}

private JButton e;
private JButton f;
private JButton g;
private JButton h;
private JFrame parent = this;

public Mobilizer() {
setTitle("Mobilizer");
setSize(275,65);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);

e = new JButton("<E:\\>");
f = new JButton("<F:\\>");
g = new JButton("<G:\\>");
h = new JButton("<H:\\>");

Container cp = getContentPane();
cp.add(e);
cp.add(f);
cp.add(g);
cp.add(h);

cp.setLayout(new FlowLayout());
e.addActionListener(new ButtonHandler('E'));
f.addActionListener(new ButtonHandler('F'));
g.addActionListener(new ButtonHandler('G'));
h.addActionListener(new ButtonHandler('H'));
}

class ButtonHandler implements ActionListener
{
public ButtonHandler(char d) {
drive = d;
}

private char drive;

public void actionPerformed(ActionEvent e2) {
try {
PrintWriter out = new PrintWriter(new FileOutputStream(
"" + drive +
":\\Java\\netbeans-5.0beta2\\etc\\netbeans.conf"
), true);
out.println("# ${HOME} will be replaced by JVM
user.home system property");

out.println("netbeans_default_userdir=\"Java/.netbeans/5.0beta2\"");
out.println("");
out.println("# options used by netbeans launcher by
default, can be overridden by explicit");
out.println("# command line switches");
out.println("netbeans_default_options=\"-J-Xms32m
-J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-ea
-J-Dapple.laf.useScreenMenuBar=true\"");
out.println("");
out.println("# default location of J2SE JDK, can be
overridden by using --jdkhome <dir> switch");
out.println("netbeans_jdkhome=\"" + drive +
":\\Java\\j2sdk1.4.2_10\"");
out.println("");
out.println("# clusters\' paths separated by
path.separator (semicolon on Windows, colon on Unices)");

out.println("#netbeans_extraclusters=\"/absolute/path/to/cluster1:/absolute/path/to/cluster2\"");
out.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} try {
PrintWriter out = new PrintWriter(new FileOutputStream(
"" + drive +
":\\Java\\.netbeans\\5.0beta2\\build.propertie s"
), true);
out.println("copyfiles.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\ant\\\\extra\\\\copyfil es.jar");
out.println("default.javac.source=1.4");
out.println("default.javac.target=1.4");
out.println("jspc.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\ant\\\\lib\\\\ant.jar:${j2ee.p latform.classpath}:"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jaspe r-compiler-5.5.9.jar:"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jaspe r-runtime-5.5.9.jar:"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\commo ns-el.jar:"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\commons-logging-1.0.4.jar");
out.println("libs.absolutelayout.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\AbsoluteLayo ut.jar");
out.println("libs.absolutelayout.javadoc=");
out.println("libs.absolutelayout.src=");
out.println("libs.jaxrpc16.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ activation.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ FastInfoset.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\jaxrpc16\\\\ja x-qname.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ jaxp-api.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ jaxrpc-api.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ jaxrpc-impl.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ jaxrpc-spi.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ jsr173_api.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ mail.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ relaxngDatatype.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ saaj-api.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ saaj-impl.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\jaxrpc16\\\\ xsdlib.jar");
out.println("libs.jaxrpc16.javadoc=");
out.println("libs.jaxrpc16.src=");
out.println("libs.jsf.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\commons-beanutils.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\commons-collections.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\commons-digester.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\commons-logging.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\jsf-api.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jsf\\ \\jsf-impl.jar");
out.println("libs.jsf.javadoc=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\docs\\\\jsf-1.1.01-javadoc.zip");
out.println("libs.jsf.src=");
out.println("libs.jstl11.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\stand ard.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\jstl. jar");
out.println("libs.jstl11.javadoc=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\docs\\\\jstl-1.1.2-javadoc.zip");
out.println("libs.jstl11.src=");
out.println("libs.junit.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\junit-3.8.1.jar");
out.println("libs.junit.javadoc=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\docs\\\\junit-3.8.1-api.zip");
out.println("libs.junit.src=");
out.println("libs.struts.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\antlr.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\commons-beanutils.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\commons-digester.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\commons-fileupload.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\commons-logging.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\commons-validator.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\jakarta-oro.jar;"
+ drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\modules\\\\ext\\\\strut s\\\\struts.jar");
out.println("libs.struts.javadoc=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\docs\\\\struts-javadoc.zip");
out.println("libs.struts.src=");
out.println("libs.swing-layout.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\ide6\\\\modules\\\\ext\\\\swing-layout-0.9.jar");
out.println("libs.swing-layout.javadoc=");
out.println("libs.swing-layout.src=");

out.println("nbplatform.default.harness.dir=${nbpl atform.default.netbeans.dest.dir}/harness");
out.println("nbplatform.default.netbeans.dest.dir= " +
drive + ":\\\\Java\\\\netbeans-5.0beta2");
out.println("wsclientuptodate.classpath=" + drive +
":\\\\Java\\\\netbeans-5.0beta2\\\\enterprise2\\\\ant\\\\extra\\\\wsclien tuptodate.jar");

out.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
}
Toolkit.getDefaultToolkit().beep();
}
}
}



All times are GMT. The time now is 01:15 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.